Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@utxos/sdk",
"version": "0.1.3",
"version": "0.1.4",
"description": "UTXOS SDK - Web3 infrastructure platform for UTXO blockchains",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/tokenization/spark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ export class TokenizationSpark {
}

return {
impactedOutputIds: result.impactedOutputIds,
impactedOutputIds: (result as any).impactedOutputIds ?? result.impactedTokenOutputs?.map((o: any) => o.id) ?? [],
impactedTokenAmount: result.impactedTokenAmount.toString(),
};
}
Expand Down Expand Up @@ -493,7 +493,7 @@ export class TokenizationSpark {
}

return {
impactedOutputIds: result.impactedOutputIds,
impactedOutputIds: (result as any).impactedOutputIds ?? result.impactedTokenOutputs?.map((o: any) => o.id) ?? [],
impactedTokenAmount: result.impactedTokenAmount.toString(),
};
}
Expand Down
38 changes: 38 additions & 0 deletions src/types/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,44 @@ export type Web3JWTBody = {

export type Web3AuthProvider = "google" | "discord" | "twitter" | "apple" | "email";

/** Role a user can have within a project */
export type Web3ProjectRole = "owner" | "admin" | "developer" | "billing";

/** Status of a project invitation */
export type Web3InvitationStatus = "pending" | "accepted" | "revoked";

/** A project invitation (invite link) */
export type Web3ProjectInvitation = {
id: string;
projectId: string;
token: string;
role: Web3ProjectRole;
status: Web3InvitationStatus;
expiresAt: string;
createdBy: string;
usedBy: string | null;
usedAt: string | null;
createdAt: string;
};

/** Public info shown to someone viewing an invite link before accepting */
export type Web3InvitationInfo = {
id: string;
role: Web3ProjectRole;
projectName: string;
projectId: string;
};

/** A project member with user details */
export type Web3ProjectMember = {
userId: string;
role: Web3ProjectRole;
createdAt: string;
email: string | null;
username: string | null;
avatarUrl: string | null;
};

export type SponsorshipTxParserPostRequestBody = {
txHex: string;
utxos: string;
Expand Down