@medialane/sdk 0.130.0 → 0.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{errors-Dc-g0mMr.d.ts → errors-HTG0DcWa.d.ts} +24 -12
- package/dist/{errors-C_zqe9TI.d.cts → errors-JkeKc3cu.d.cts} +24 -12
- package/dist/index.cjs +21 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -7
- package/dist/index.js.map +1 -1
- package/dist/starknet/index.cjs +21 -7
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +2 -2
- package/dist/starknet/index.d.ts +2 -2
- package/dist/starknet/index.js +21 -7
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -973,9 +973,9 @@ interface ApiBusinessProvisioning {
|
|
|
973
973
|
walletAddress: string;
|
|
974
974
|
recipientScheme: string;
|
|
975
975
|
recipientValue: string;
|
|
976
|
-
interimOwnerPubkey: string;
|
|
976
|
+
interimOwnerPubkey: string | null;
|
|
977
977
|
newOwnerPubkey: string | null;
|
|
978
|
-
status: "DEPLOYED" | "
|
|
978
|
+
status: "DEPLOYED" | "REUSED" | "TRANSFERRED";
|
|
979
979
|
}
|
|
980
980
|
interface ApiWalletActivity {
|
|
981
981
|
id: string;
|
|
@@ -1206,20 +1206,12 @@ declare class ApiClient {
|
|
|
1206
1206
|
claim: ApiCollectionClaim;
|
|
1207
1207
|
}>;
|
|
1208
1208
|
registerBusinessProvisioning(params: {
|
|
1209
|
-
chain
|
|
1209
|
+
chain?: "STARKNET";
|
|
1210
1210
|
recipientScheme: string;
|
|
1211
1211
|
recipientValue: string;
|
|
1212
|
-
interimOwnerPubkey: string;
|
|
1213
|
-
derivationSalt: string;
|
|
1214
|
-
deployment: {
|
|
1215
|
-
typedData: unknown;
|
|
1216
|
-
signature: string[];
|
|
1217
|
-
deployment: unknown;
|
|
1218
|
-
};
|
|
1219
1212
|
}): Promise<ApiResponse<ApiBusinessProvisioning> & {
|
|
1220
1213
|
reusedExistingWallet?: boolean;
|
|
1221
1214
|
}>;
|
|
1222
|
-
completeBusinessProvisioning(id: string): Promise<ApiResponse<ApiBusinessProvisioning>>;
|
|
1223
1215
|
getCollectionProfile(contractAddress: string): Promise<ApiCollectionProfile | null>;
|
|
1224
1216
|
updateCollectionProfile(contractAddress: string, data: UpdateCollectionProfileInput, siwsToken: string): Promise<ApiCollectionProfile>;
|
|
1225
1217
|
getWalletActivity(address: string, chain?: "STARKNET"): Promise<ApiResponse<ApiWalletActivity[]>>;
|
|
@@ -1269,7 +1261,27 @@ declare class ApiClient {
|
|
|
1269
1261
|
email?: string;
|
|
1270
1262
|
accountToken?: string;
|
|
1271
1263
|
}): Promise<ApiUserWallet>;
|
|
1272
|
-
|
|
1264
|
+
checkEmail(email: string): Promise<{
|
|
1265
|
+
exists: boolean;
|
|
1266
|
+
walletWaiting: boolean;
|
|
1267
|
+
}>;
|
|
1268
|
+
requestEmailCode(email: string): Promise<void>;
|
|
1269
|
+
registerEmailAccount(email: string): Promise<void>;
|
|
1270
|
+
verifyEmailCode(email: string, code: string): Promise<{
|
|
1271
|
+
token: string;
|
|
1272
|
+
waitingWallets: string[];
|
|
1273
|
+
}>;
|
|
1274
|
+
claimWallet(params: {
|
|
1275
|
+
newOwnerPubkey: string;
|
|
1276
|
+
proofs: {
|
|
1277
|
+
walletAddress: string;
|
|
1278
|
+
signature: string[];
|
|
1279
|
+
expiration: number;
|
|
1280
|
+
}[];
|
|
1281
|
+
}): Promise<{
|
|
1282
|
+
claimed: string[];
|
|
1283
|
+
}>;
|
|
1284
|
+
getSessionWallet(): Promise<string | null>;
|
|
1273
1285
|
getMyWallet(siwsToken: string): Promise<ApiUserWallet | null>;
|
|
1274
1286
|
changeMyEmail(email: string, siwsToken: string): Promise<{
|
|
1275
1287
|
email: string;
|
|
@@ -973,9 +973,9 @@ interface ApiBusinessProvisioning {
|
|
|
973
973
|
walletAddress: string;
|
|
974
974
|
recipientScheme: string;
|
|
975
975
|
recipientValue: string;
|
|
976
|
-
interimOwnerPubkey: string;
|
|
976
|
+
interimOwnerPubkey: string | null;
|
|
977
977
|
newOwnerPubkey: string | null;
|
|
978
|
-
status: "DEPLOYED" | "
|
|
978
|
+
status: "DEPLOYED" | "REUSED" | "TRANSFERRED";
|
|
979
979
|
}
|
|
980
980
|
interface ApiWalletActivity {
|
|
981
981
|
id: string;
|
|
@@ -1206,20 +1206,12 @@ declare class ApiClient {
|
|
|
1206
1206
|
claim: ApiCollectionClaim;
|
|
1207
1207
|
}>;
|
|
1208
1208
|
registerBusinessProvisioning(params: {
|
|
1209
|
-
chain
|
|
1209
|
+
chain?: "STARKNET";
|
|
1210
1210
|
recipientScheme: string;
|
|
1211
1211
|
recipientValue: string;
|
|
1212
|
-
interimOwnerPubkey: string;
|
|
1213
|
-
derivationSalt: string;
|
|
1214
|
-
deployment: {
|
|
1215
|
-
typedData: unknown;
|
|
1216
|
-
signature: string[];
|
|
1217
|
-
deployment: unknown;
|
|
1218
|
-
};
|
|
1219
1212
|
}): Promise<ApiResponse<ApiBusinessProvisioning> & {
|
|
1220
1213
|
reusedExistingWallet?: boolean;
|
|
1221
1214
|
}>;
|
|
1222
|
-
completeBusinessProvisioning(id: string): Promise<ApiResponse<ApiBusinessProvisioning>>;
|
|
1223
1215
|
getCollectionProfile(contractAddress: string): Promise<ApiCollectionProfile | null>;
|
|
1224
1216
|
updateCollectionProfile(contractAddress: string, data: UpdateCollectionProfileInput, siwsToken: string): Promise<ApiCollectionProfile>;
|
|
1225
1217
|
getWalletActivity(address: string, chain?: "STARKNET"): Promise<ApiResponse<ApiWalletActivity[]>>;
|
|
@@ -1269,7 +1261,27 @@ declare class ApiClient {
|
|
|
1269
1261
|
email?: string;
|
|
1270
1262
|
accountToken?: string;
|
|
1271
1263
|
}): Promise<ApiUserWallet>;
|
|
1272
|
-
|
|
1264
|
+
checkEmail(email: string): Promise<{
|
|
1265
|
+
exists: boolean;
|
|
1266
|
+
walletWaiting: boolean;
|
|
1267
|
+
}>;
|
|
1268
|
+
requestEmailCode(email: string): Promise<void>;
|
|
1269
|
+
registerEmailAccount(email: string): Promise<void>;
|
|
1270
|
+
verifyEmailCode(email: string, code: string): Promise<{
|
|
1271
|
+
token: string;
|
|
1272
|
+
waitingWallets: string[];
|
|
1273
|
+
}>;
|
|
1274
|
+
claimWallet(params: {
|
|
1275
|
+
newOwnerPubkey: string;
|
|
1276
|
+
proofs: {
|
|
1277
|
+
walletAddress: string;
|
|
1278
|
+
signature: string[];
|
|
1279
|
+
expiration: number;
|
|
1280
|
+
}[];
|
|
1281
|
+
}): Promise<{
|
|
1282
|
+
claimed: string[];
|
|
1283
|
+
}>;
|
|
1284
|
+
getSessionWallet(): Promise<string | null>;
|
|
1273
1285
|
getMyWallet(siwsToken: string): Promise<ApiUserWallet | null>;
|
|
1274
1286
|
changeMyEmail(email: string, siwsToken: string): Promise<{
|
|
1275
1287
|
email: string;
|
package/dist/index.cjs
CHANGED
|
@@ -674,12 +674,9 @@ var ApiClient = class {
|
|
|
674
674
|
registerBusinessProvisioning(params) {
|
|
675
675
|
return this.post(
|
|
676
676
|
"/v1/business/provisioning",
|
|
677
|
-
params
|
|
677
|
+
{ chain: params.chain ?? "STARKNET", recipientScheme: params.recipientScheme, recipientValue: params.recipientValue }
|
|
678
678
|
);
|
|
679
679
|
}
|
|
680
|
-
completeBusinessProvisioning(id) {
|
|
681
|
-
return this.post(`/v1/business/provisioning/${id}/complete`, {});
|
|
682
|
-
}
|
|
683
680
|
getCollectionProfile(contractAddress) {
|
|
684
681
|
return this.request(
|
|
685
682
|
`/v1/collections/${this.addr(contractAddress)}/profile`,
|
|
@@ -776,11 +773,28 @@ var ApiClient = class {
|
|
|
776
773
|
headers: this.bearer(siwsToken)
|
|
777
774
|
});
|
|
778
775
|
}
|
|
779
|
-
async
|
|
780
|
-
const
|
|
776
|
+
async checkEmail(email) {
|
|
777
|
+
const body = await this.get(
|
|
781
778
|
`/v1/auth/email/exists?email=${encodeURIComponent(email)}`
|
|
782
779
|
);
|
|
783
|
-
return exists;
|
|
780
|
+
return { exists: body.exists, walletWaiting: body.walletWaiting === true };
|
|
781
|
+
}
|
|
782
|
+
async requestEmailCode(email) {
|
|
783
|
+
await this.post("/v1/auth/email/request-code", { email });
|
|
784
|
+
}
|
|
785
|
+
async registerEmailAccount(email) {
|
|
786
|
+
await this.post("/v1/auth/email/register-account", { email });
|
|
787
|
+
}
|
|
788
|
+
async verifyEmailCode(email, code) {
|
|
789
|
+
const body = await this.post("/v1/auth/email/verify-code", { email, code });
|
|
790
|
+
return { token: body.token, waitingWallets: body.waitingWallets ?? [] };
|
|
791
|
+
}
|
|
792
|
+
claimWallet(params) {
|
|
793
|
+
return this.post("/v1/users/me/claim-wallet", params);
|
|
794
|
+
}
|
|
795
|
+
async getSessionWallet() {
|
|
796
|
+
const body = await this.post("/v1/users/me/wallet", {});
|
|
797
|
+
return body.walletAddress ?? null;
|
|
784
798
|
}
|
|
785
799
|
getMyWallet(siwsToken) {
|
|
786
800
|
return this.request(
|