@zeroxyz/sdk 0.10.0 → 0.11.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/CHANGELOG.md +8 -0
- package/README.md +17 -3
- package/dist/{chunk-IFVGW4ZN.cjs → chunk-HKF4TRC6.cjs} +46 -3
- package/dist/chunk-HKF4TRC6.cjs.map +1 -0
- package/dist/{chunk-A7WZYQXS.js → chunk-T77VVLOM.js} +46 -3
- package/dist/chunk-T77VVLOM.js.map +1 -0
- package/dist/{client-D_ohktBl.d.cts → client-DKbrAo9Z.d.cts} +19 -1
- package/dist/{client-D_ohktBl.d.ts → client-DKbrAo9Z.d.ts} +19 -1
- package/dist/index.cjs +44 -44
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-A7WZYQXS.js.map +0 -1
- package/dist/chunk-IFVGW4ZN.cjs.map +0 -1
|
@@ -1950,7 +1950,7 @@ var clientFetch = async (client, url, opts = {}) => {
|
|
|
1950
1950
|
|
|
1951
1951
|
// package.json
|
|
1952
1952
|
var package_default = {
|
|
1953
|
-
version: "0.
|
|
1953
|
+
version: "0.11.0"};
|
|
1954
1954
|
|
|
1955
1955
|
// src/version.ts
|
|
1956
1956
|
var SDK_VERSION = package_default.version;
|
|
@@ -2441,6 +2441,7 @@ var userWalletDtoSchema = z.object({
|
|
|
2441
2441
|
source: z.enum(["self_custody", "privy_embedded"]),
|
|
2442
2442
|
isPrimary: z.boolean(),
|
|
2443
2443
|
linkedAt: z.union([z.string(), z.date()]).nullable().optional(),
|
|
2444
|
+
importedAt: z.union([z.string(), z.date()]).nullable().optional(),
|
|
2444
2445
|
delegationGranted: z.boolean(),
|
|
2445
2446
|
signerQuorumId: z.string().nullable(),
|
|
2446
2447
|
// Per-transaction USDC cap in base units (6 dp). null = unlimited, 0 = free-only.
|
|
@@ -3226,6 +3227,48 @@ var Wallet = class {
|
|
|
3226
3227
|
},
|
|
3227
3228
|
userWalletDtoSchema
|
|
3228
3229
|
);
|
|
3230
|
+
// Link an existing self-custody wallet to the session user by private key.
|
|
3231
|
+
// Session-only. 409s when the wallet is already linked (to this or another
|
|
3232
|
+
// profile — the error message says which).
|
|
3233
|
+
import = (opts) => request(
|
|
3234
|
+
this.client,
|
|
3235
|
+
{
|
|
3236
|
+
method: "POST",
|
|
3237
|
+
path: "/v1/users/me/wallets/import",
|
|
3238
|
+
body: {
|
|
3239
|
+
privateKey: opts.privateKey,
|
|
3240
|
+
...opts.makePrimary !== void 0 ? { makePrimary: opts.makePrimary } : {}
|
|
3241
|
+
},
|
|
3242
|
+
signal: opts.signal
|
|
3243
|
+
},
|
|
3244
|
+
userWalletDtoSchema
|
|
3245
|
+
);
|
|
3246
|
+
// Make one of the session user's linked wallets the primary payer.
|
|
3247
|
+
// Session-only. 404s when the address isn't linked to the user.
|
|
3248
|
+
setPrimary = (opts) => request(
|
|
3249
|
+
this.client,
|
|
3250
|
+
{
|
|
3251
|
+
method: "PATCH",
|
|
3252
|
+
path: "/v1/users/me/wallets/primary",
|
|
3253
|
+
body: { walletAddress: opts.walletAddress },
|
|
3254
|
+
signal: opts.signal
|
|
3255
|
+
},
|
|
3256
|
+
userWalletDtoSchema
|
|
3257
|
+
);
|
|
3258
|
+
// Unlink a wallet from the session user. Session-only. 409s on the primary
|
|
3259
|
+
// wallet or a non-zero balance (the error message says which); 404s when
|
|
3260
|
+
// the address isn't linked. Responds 204 — resolves to void.
|
|
3261
|
+
remove = async (opts) => {
|
|
3262
|
+
await request(
|
|
3263
|
+
this.client,
|
|
3264
|
+
{
|
|
3265
|
+
method: "DELETE",
|
|
3266
|
+
path: `/v1/users/me/wallets/${opts.walletAddress}`,
|
|
3267
|
+
signal: opts.signal
|
|
3268
|
+
},
|
|
3269
|
+
z.undefined()
|
|
3270
|
+
);
|
|
3271
|
+
};
|
|
3229
3272
|
// Routes by identity: account mode signs EIP-191 against /v1/wallet/fund-url,
|
|
3230
3273
|
// session mode hits /v1/users/me/fund-url (Bearer-authed, wallet resolved
|
|
3231
3274
|
// server-side). Both honor `provider` (coinbase | stripe).
|
|
@@ -3744,5 +3787,5 @@ var ZeroClient = class _ZeroClient {
|
|
|
3744
3787
|
};
|
|
3745
3788
|
|
|
3746
3789
|
export { Auth, AuthAgent, AuthDevice, BUG_REPORT_CATEGORIES, BugReports, Capabilities, DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, FETCH_SKIP_REASONS, FETCH_WARNINGS, Payments, Runs, SDK_VERSION, TEMPO_CHAIN_ID2 as TEMPO_CHAIN_ID, TEMPO_TESTNET_CHAIN_ID, USDC_BASE, USDC_DECIMALS, USDC_TEMPO, Wallet, ZeroAgentAuthError, ZeroApiError, ZeroAuthError, ZeroClient, ZeroConfigurationError, ZeroError, ZeroPaymentError, ZeroSessionCloseFailedError, ZeroTimeoutError, ZeroValidationError, ZeroWalletError, asSchemaNode, coerceTempoChainId, createManagedAccount, extractInputEnvelope, isShortToken, normalizeTransportEnvelopeRequest, paymentHasAnchor, tempoChainLabelFromId, unwrapTransportEnvelope };
|
|
3747
|
-
//# sourceMappingURL=chunk-
|
|
3748
|
-
//# sourceMappingURL=chunk-
|
|
3790
|
+
//# sourceMappingURL=chunk-T77VVLOM.js.map
|
|
3791
|
+
//# sourceMappingURL=chunk-T77VVLOM.js.map
|