@medialane/sdk 0.153.0 → 0.154.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/README.md +0 -1
- package/dist/{errors-DQRDzDiT.d.cts → errors-BfiX06G4.d.cts} +2 -9
- package/dist/{errors-dgfLd7nS.d.ts → errors-CKO_JGDP.d.ts} +2 -9
- package/dist/index.cjs +2 -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 +2 -7
- package/dist/index.js.map +1 -1
- package/dist/starknet/index.cjs +5 -14
- 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 +5 -14
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { bF as ResolvedConfig, bN as TxResult, a_ as CreatePopCollectionParams, aL as ClaimConditions, aW as CreateDropParams, b3 as CreateTicketParams, bp as MintTicketsParams, aY as CreateMembershipParams, bo as MintMembershipsParams, b1 as CreateSponsorshipOfferParams, bC as ProposeSponsorshipParams, k as ApiClient, bm as MedialaneConfig, bn as MedialaneErrorCode, bu as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bV as SealedOwner, bW as ReceiptProviderLike, bX as WalletExecutor, bY as ExecutedTransaction, bZ as PasskeyOwner, b_ as CreatedOwner } from '../errors-BfiX06G4.cjs';
|
|
2
|
+
export { b$ as InvalidRecoveryKeyError, c0 as OwnerSigner, bx as PasskeyCancelledError, c1 as PasskeyConfig, c2 as RecoveryKey, bP as UserFacingError, c3 as createPasskeyOwner, c4 as encodeRecoveryKey, c5 as parseRecoveryKey } from '../errors-BfiX06G4.cjs';
|
|
3
3
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
|
|
4
4
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CO6YYHVA.cjs';
|
|
5
5
|
import 'zod';
|
package/dist/starknet/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { bF as ResolvedConfig, bN as TxResult, a_ as CreatePopCollectionParams, aL as ClaimConditions, aW as CreateDropParams, b3 as CreateTicketParams, bp as MintTicketsParams, aY as CreateMembershipParams, bo as MintMembershipsParams, b1 as CreateSponsorshipOfferParams, bC as ProposeSponsorshipParams, k as ApiClient, bm as MedialaneConfig, bn as MedialaneErrorCode, bu as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bV as SealedOwner, bW as ReceiptProviderLike, bX as WalletExecutor, bY as ExecutedTransaction, bZ as PasskeyOwner, b_ as CreatedOwner } from '../errors-CKO_JGDP.js';
|
|
2
|
+
export { b$ as InvalidRecoveryKeyError, c0 as OwnerSigner, bx as PasskeyCancelledError, c1 as PasskeyConfig, c2 as RecoveryKey, bP as UserFacingError, c3 as createPasskeyOwner, c4 as encodeRecoveryKey, c5 as parseRecoveryKey } from '../errors-CKO_JGDP.js';
|
|
3
3
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
|
|
4
4
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CO6YYHVA.js';
|
|
5
5
|
import 'zod';
|
package/dist/starknet/index.js
CHANGED
|
@@ -90,7 +90,6 @@ var MedialaneConfigSchema = z.object({
|
|
|
90
90
|
rpcUrl: z.string().url().optional(),
|
|
91
91
|
backendUrl: z.string().url().optional(),
|
|
92
92
|
apiKey: z.string().optional(),
|
|
93
|
-
appSource: z.string().regex(/^[A-Z][A-Z0-9_]*$/).optional(),
|
|
94
93
|
marketplace721Contract: z.string().optional(),
|
|
95
94
|
marketplaceContract: z.string().optional(),
|
|
96
95
|
marketplace1155Contract: z.string().optional(),
|
|
@@ -115,7 +114,6 @@ function resolveConfig(raw) {
|
|
|
115
114
|
rpcUrl: parsed.rpcUrl ?? coords.rpcUrl,
|
|
116
115
|
backendUrl: parsed.backendUrl,
|
|
117
116
|
apiKey: parsed.apiKey,
|
|
118
|
-
appSource: parsed.appSource,
|
|
119
117
|
marketplace721Contract,
|
|
120
118
|
marketplaceContract: marketplace721Contract,
|
|
121
119
|
marketplace1155Contract: parsed.marketplace1155Contract ?? sn.marketplace1155,
|
|
@@ -266,13 +264,10 @@ function parseRetryAfter(value) {
|
|
|
266
264
|
return void 0;
|
|
267
265
|
}
|
|
268
266
|
var ApiClient = class {
|
|
269
|
-
constructor(baseUrl, apiKey, retryOptions, chain = "STARKNET"
|
|
267
|
+
constructor(baseUrl, apiKey, retryOptions, chain = "STARKNET") {
|
|
270
268
|
this.baseUrl = baseUrl;
|
|
271
269
|
this.chain = chain;
|
|
272
|
-
this.baseHeaders = {
|
|
273
|
-
...apiKey ? { "x-api-key": apiKey } : {},
|
|
274
|
-
...appSource ? { "x-app-source": appSource } : {}
|
|
275
|
-
};
|
|
270
|
+
this.baseHeaders = apiKey ? { "x-api-key": apiKey } : {};
|
|
276
271
|
this.retryOptions = retryOptions;
|
|
277
272
|
}
|
|
278
273
|
addr(a) {
|
|
@@ -11114,7 +11109,7 @@ var MedialaneClient = class {
|
|
|
11114
11109
|
}
|
|
11115
11110
|
});
|
|
11116
11111
|
} else {
|
|
11117
|
-
this.api = new ApiClient(this.config.backendUrl, this.config.apiKey, this.config.retryOptions, this.config.chain
|
|
11112
|
+
this.api = new ApiClient(this.config.backendUrl, this.config.apiKey, this.config.retryOptions, this.config.chain);
|
|
11118
11113
|
}
|
|
11119
11114
|
}
|
|
11120
11115
|
get chain() {
|
|
@@ -11806,13 +11801,9 @@ async function requestSiwsToken({
|
|
|
11806
11801
|
appSource
|
|
11807
11802
|
}) {
|
|
11808
11803
|
const base = backendUrl.replace(/\/$/, "");
|
|
11809
|
-
const headers = {
|
|
11810
|
-
"Content-Type": "application/json",
|
|
11811
|
-
...appSource ? { "x-app-source": appSource } : {}
|
|
11812
|
-
};
|
|
11813
11804
|
const nonceRes = await fetch(`${base}/v1/auth/siws/nonce`, {
|
|
11814
11805
|
method: "POST",
|
|
11815
|
-
headers,
|
|
11806
|
+
headers: { "Content-Type": "application/json" },
|
|
11816
11807
|
body: JSON.stringify({ walletAddress })
|
|
11817
11808
|
});
|
|
11818
11809
|
if (!nonceRes.ok) {
|
|
@@ -11822,7 +11813,7 @@ async function requestSiwsToken({
|
|
|
11822
11813
|
const signature = normalizeSiwsSignature(await signer.signMessage(typedData));
|
|
11823
11814
|
const verifyRes = await fetch(`${base}/v1/auth/siws/verify`, {
|
|
11824
11815
|
method: "POST",
|
|
11825
|
-
headers,
|
|
11816
|
+
headers: { "Content-Type": "application/json" },
|
|
11826
11817
|
body: JSON.stringify({ walletAddress, nonce, signature, ...appSource ? { appSource } : {} })
|
|
11827
11818
|
});
|
|
11828
11819
|
if (!verifyRes.ok) {
|