@symmio/trading-react 3.0.0 → 3.1.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/account-layer/use-account-balance-of.d.ts +5 -4
- package/dist/account-layer/use-account-balance-of.d.ts.map +1 -1
- package/dist/account-layer/use-account-balance-of.js.map +1 -1
- package/dist/account-layer/use-add-margin.d.ts.map +1 -1
- package/dist/account-layer/use-add-margin.js +1 -3
- package/dist/account-layer/use-add-margin.js.map +1 -1
- package/dist/account-layer/use-allocate.d.ts.map +1 -1
- package/dist/account-layer/use-allocate.js +1 -3
- package/dist/account-layer/use-allocate.js.map +1 -1
- package/dist/account-layer/use-cancel-registration.d.ts.map +1 -1
- package/dist/account-layer/use-cancel-registration.js +1 -2
- package/dist/account-layer/use-cancel-registration.js.map +1 -1
- package/dist/account-layer/use-create-sub-accounts.d.ts.map +1 -1
- package/dist/account-layer/use-create-sub-accounts.js +1 -3
- package/dist/account-layer/use-create-sub-accounts.js.map +1 -1
- package/dist/account-layer/use-deallocate-and-initiate-withdraw.d.ts.map +1 -1
- package/dist/account-layer/use-deallocate-and-initiate-withdraw.js +1 -6
- package/dist/account-layer/use-deallocate-and-initiate-withdraw.js.map +1 -1
- package/dist/account-layer/use-deallocate.d.ts.map +1 -1
- package/dist/account-layer/use-deallocate.js +1 -3
- package/dist/account-layer/use-deallocate.js.map +1 -1
- package/dist/account-layer/use-delete-sub-account.d.ts.map +1 -1
- package/dist/account-layer/use-delete-sub-account.js +1 -2
- package/dist/account-layer/use-delete-sub-account.js.map +1 -1
- package/dist/account-layer/use-deposit-and-allocate.d.ts.map +1 -1
- package/dist/account-layer/use-deposit-and-allocate.js +1 -3
- package/dist/account-layer/use-deposit-and-allocate.js.map +1 -1
- package/dist/account-layer/use-deposit.d.ts.map +1 -1
- package/dist/account-layer/use-deposit.js +1 -3
- package/dist/account-layer/use-deposit.js.map +1 -1
- package/dist/account-layer/use-edit-account-name.d.ts.map +1 -1
- package/dist/account-layer/use-edit-account-name.js +1 -3
- package/dist/account-layer/use-edit-account-name.js.map +1 -1
- package/dist/account-layer/use-remove-margin.d.ts.map +1 -1
- package/dist/account-layer/use-remove-margin.js +1 -3
- package/dist/account-layer/use-remove-margin.js.map +1 -1
- package/dist/account-layer/use-request-to-register-affiliate.d.ts.map +1 -1
- package/dist/account-layer/use-request-to-register-affiliate.js +1 -2
- package/dist/account-layer/use-request-to-register-affiliate.js.map +1 -1
- package/dist/collateral/use-approve-collateral.d.ts.map +1 -1
- package/dist/collateral/use-approve-collateral.js +1 -2
- package/dist/collateral/use-approve-collateral.js.map +1 -1
- package/dist/errors/normalize-symm-error.d.ts.map +1 -1
- package/dist/errors/normalize-symm-error.js +1 -0
- package/dist/errors/normalize-symm-error.js.map +1 -1
- package/dist/errors/symmio-request-error.d.ts +19 -0
- package/dist/errors/symmio-request-error.d.ts.map +1 -1
- package/dist/errors/symmio-request-error.js +2 -1
- package/dist/errors/symmio-request-error.js.map +1 -1
- package/dist/gasless/gasless-relay-types.d.ts +115 -0
- package/dist/gasless/gasless-relay-types.d.ts.map +1 -0
- package/dist/gasless/gasless-relay-types.js +9 -0
- package/dist/gasless/gasless-relay-types.js.map +1 -0
- package/dist/gasless/index.d.ts +21 -0
- package/dist/gasless/index.d.ts.map +1 -0
- package/dist/gasless/index.js +21 -0
- package/dist/gasless/invalidate-relay-reads.d.ts +96 -0
- package/dist/gasless/invalidate-relay-reads.d.ts.map +1 -0
- package/dist/gasless/invalidate-relay-reads.js +107 -0
- package/dist/gasless/invalidate-relay-reads.js.map +1 -0
- package/dist/gasless/use-approve-operational-fee.d.ts +38 -0
- package/dist/gasless/use-approve-operational-fee.d.ts.map +1 -0
- package/dist/gasless/use-approve-operational-fee.js +37 -0
- package/dist/gasless/use-approve-operational-fee.js.map +1 -0
- package/dist/gasless/use-debounced-batch.d.ts +22 -0
- package/dist/gasless/use-debounced-batch.d.ts.map +1 -0
- package/dist/gasless/use-debounced-batch.js +27 -0
- package/dist/gasless/use-debounced-batch.js.map +1 -0
- package/dist/gasless/use-gasless-batch-fee-quote.d.ts +48 -0
- package/dist/gasless/use-gasless-batch-fee-quote.d.ts.map +1 -0
- package/dist/gasless/use-gasless-batch-fee-quote.js +33 -0
- package/dist/gasless/use-gasless-batch-fee-quote.js.map +1 -0
- package/dist/gasless/use-gasless-deposit-policy.d.ts +28 -0
- package/dist/gasless/use-gasless-deposit-policy.d.ts.map +1 -0
- package/dist/gasless/use-gasless-deposit-policy.js +27 -0
- package/dist/gasless/use-gasless-deposit-policy.js.map +1 -0
- package/dist/gasless/use-gasless-fee-quote.d.ts +25 -0
- package/dist/gasless/use-gasless-fee-quote.d.ts.map +1 -0
- package/dist/gasless/use-gasless-fee-quote.js +27 -0
- package/dist/gasless/use-gasless-fee-quote.js.map +1 -0
- package/dist/gasless/use-gasless-relay-confirmation.d.ts +72 -0
- package/dist/gasless/use-gasless-relay-confirmation.d.ts.map +1 -0
- package/dist/gasless/use-gasless-relay-confirmation.js +148 -0
- package/dist/gasless/use-gasless-relay-confirmation.js.map +1 -0
- package/dist/gasless/use-gasless-request-stream.d.ts +34 -0
- package/dist/gasless/use-gasless-request-stream.d.ts.map +1 -0
- package/dist/gasless/use-gasless-request-stream.js +86 -0
- package/dist/gasless/use-gasless-request-stream.js.map +1 -0
- package/dist/gasless/use-gasless-request-transactions.d.ts +42 -0
- package/dist/gasless/use-gasless-request-transactions.d.ts.map +1 -0
- package/dist/gasless/use-gasless-request-transactions.js +28 -0
- package/dist/gasless/use-gasless-request-transactions.js.map +1 -0
- package/dist/gasless/use-gasless-request.d.ts +56 -0
- package/dist/gasless/use-gasless-request.d.ts.map +1 -0
- package/dist/gasless/use-gasless-request.js +51 -0
- package/dist/gasless/use-gasless-request.js.map +1 -0
- package/dist/gasless/use-gasless-wallet-address.d.ts +24 -0
- package/dist/gasless/use-gasless-wallet-address.d.ts.map +1 -0
- package/dist/gasless/use-gasless-wallet-address.js +27 -0
- package/dist/gasless/use-gasless-wallet-address.js.map +1 -0
- package/dist/gasless/use-gasless-wallet-creation-fee.d.ts +29 -0
- package/dist/gasless/use-gasless-wallet-creation-fee.d.ts.map +1 -0
- package/dist/gasless/use-gasless-wallet-creation-fee.js +27 -0
- package/dist/gasless/use-gasless-wallet-creation-fee.js.map +1 -0
- package/dist/gasless/use-gasless-wallet-execute-selectors.d.ts +44 -0
- package/dist/gasless/use-gasless-wallet-execute-selectors.d.ts.map +1 -0
- package/dist/gasless/use-gasless-wallet-execute-selectors.js +19 -0
- package/dist/gasless/use-gasless-wallet-execute-selectors.js.map +1 -0
- package/dist/gasless/use-gasless-wallet-execute.d.ts +51 -0
- package/dist/gasless/use-gasless-wallet-execute.d.ts.map +1 -0
- package/dist/gasless/use-gasless-wallet-execute.js +44 -0
- package/dist/gasless/use-gasless-wallet-execute.js.map +1 -0
- package/dist/gasless/use-gasless-wallet-nonce.d.ts +27 -0
- package/dist/gasless/use-gasless-wallet-nonce.d.ts.map +1 -0
- package/dist/gasless/use-gasless-wallet-nonce.js +27 -0
- package/dist/gasless/use-gasless-wallet-nonce.js.map +1 -0
- package/dist/gasless/use-operational-fee-allowance.d.ts +23 -0
- package/dist/gasless/use-operational-fee-allowance.d.ts.map +1 -0
- package/dist/gasless/use-operational-fee-allowance.js +27 -0
- package/dist/gasless/use-operational-fee-allowance.js.map +1 -0
- package/dist/gasless/use-relay-gasless-batch.d.ts +48 -0
- package/dist/gasless/use-relay-gasless-batch.d.ts.map +1 -0
- package/dist/gasless/use-relay-gasless-batch.js +44 -0
- package/dist/gasless/use-relay-gasless-batch.js.map +1 -0
- package/dist/gasless/use-relay-instant-operations.d.ts +43 -0
- package/dist/gasless/use-relay-instant-operations.d.ts.map +1 -0
- package/dist/gasless/use-relay-instant-operations.js +44 -0
- package/dist/gasless/use-relay-instant-operations.js.map +1 -0
- package/dist/gasless/use-resubmit-gasless-request.d.ts +39 -0
- package/dist/gasless/use-resubmit-gasless-request.d.ts.map +1 -0
- package/dist/gasless/use-resubmit-gasless-request.js +56 -0
- package/dist/gasless/use-resubmit-gasless-request.js.map +1 -0
- package/dist/gasless/use-settle-gasless-deposit-existing-account.d.ts +41 -0
- package/dist/gasless/use-settle-gasless-deposit-existing-account.d.ts.map +1 -0
- package/dist/gasless/use-settle-gasless-deposit-existing-account.js +47 -0
- package/dist/gasless/use-settle-gasless-deposit-existing-account.js.map +1 -0
- package/dist/gasless/use-settle-gasless-deposit-new-account.d.ts +48 -0
- package/dist/gasless/use-settle-gasless-deposit-new-account.d.ts.map +1 -0
- package/dist/gasless/use-settle-gasless-deposit-new-account.js +48 -0
- package/dist/gasless/use-settle-gasless-deposit-new-account.js.map +1 -0
- package/dist/gasless/use-supports-gasless-service.d.ts +22 -0
- package/dist/gasless/use-supports-gasless-service.d.ts.map +1 -0
- package/dist/gasless/use-supports-gasless-service.js +13 -0
- package/dist/gasless/use-supports-gasless-service.js.map +1 -0
- package/dist/index.d.ts +29 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +251 -221
- package/dist/instant-layer/index.d.ts +7 -0
- package/dist/instant-layer/index.d.ts.map +1 -1
- package/dist/instant-layer/index.js +26 -19
- package/dist/instant-layer/use-active-delegations.d.ts +31 -0
- package/dist/instant-layer/use-active-delegations.d.ts.map +1 -0
- package/dist/instant-layer/use-active-delegations.js +23 -0
- package/dist/instant-layer/use-active-delegations.js.map +1 -0
- package/dist/instant-layer/use-are-delegations-active.d.ts +100 -0
- package/dist/instant-layer/use-are-delegations-active.d.ts.map +1 -0
- package/dist/instant-layer/use-are-delegations-active.js +60 -0
- package/dist/instant-layer/use-are-delegations-active.js.map +1 -0
- package/dist/instant-layer/use-finalize-revoke-delegation.d.ts +32 -0
- package/dist/instant-layer/use-finalize-revoke-delegation.d.ts.map +1 -0
- package/dist/instant-layer/use-finalize-revoke-delegation.js +45 -0
- package/dist/instant-layer/use-finalize-revoke-delegation.js.map +1 -0
- package/dist/instant-layer/use-grant-delegation.d.ts +12 -2
- package/dist/instant-layer/use-grant-delegation.d.ts.map +1 -1
- package/dist/instant-layer/use-grant-delegation.js +27 -20
- package/dist/instant-layer/use-grant-delegation.js.map +1 -1
- package/dist/instant-layer/use-initiate-revoke-delegation.d.ts +32 -0
- package/dist/instant-layer/use-initiate-revoke-delegation.d.ts.map +1 -0
- package/dist/instant-layer/use-initiate-revoke-delegation.js +45 -0
- package/dist/instant-layer/use-initiate-revoke-delegation.js.map +1 -0
- package/dist/instant-layer/use-pending-revocation.d.ts +119 -0
- package/dist/instant-layer/use-pending-revocation.d.ts.map +1 -0
- package/dist/instant-layer/use-pending-revocation.js +73 -0
- package/dist/instant-layer/use-pending-revocation.js.map +1 -0
- package/dist/instant-layer/use-revocation-cooldown.d.ts +24 -0
- package/dist/instant-layer/use-revocation-cooldown.d.ts.map +1 -0
- package/dist/instant-layer/use-revocation-cooldown.js +23 -0
- package/dist/instant-layer/use-revocation-cooldown.js.map +1 -0
- package/dist/instant-layer/use-session-key-selectors.d.ts +53 -0
- package/dist/instant-layer/use-session-key-selectors.d.ts.map +1 -0
- package/dist/instant-layer/use-session-key-selectors.js +25 -0
- package/dist/instant-layer/use-session-key-selectors.js.map +1 -0
- package/dist/margin/use-available-instant-open-margin.js +8 -8
- package/dist/markets/index.d.ts +1 -0
- package/dist/markets/index.d.ts.map +1 -1
- package/dist/markets/index.js +3 -2
- package/dist/markets/use-funding-fees-of-party-b.d.ts +47 -0
- package/dist/markets/use-funding-fees-of-party-b.d.ts.map +1 -0
- package/dist/markets/use-funding-fees-of-party-b.js +27 -0
- package/dist/markets/use-funding-fees-of-party-b.js.map +1 -0
- package/dist/provider/create-session-key-wallet-client-resolver.d.ts +68 -0
- package/dist/provider/create-session-key-wallet-client-resolver.d.ts.map +1 -0
- package/dist/provider/create-session-key-wallet-client-resolver.js +51 -0
- package/dist/provider/create-session-key-wallet-client-resolver.js.map +1 -0
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +5 -4
- package/dist/provider/symmio-provider.d.ts +7 -2
- package/dist/provider/symmio-provider.d.ts.map +1 -1
- package/dist/provider/symmio-provider.js +10 -7
- package/dist/provider/symmio-provider.js.map +1 -1
- package/dist/quotes/index.d.ts +2 -0
- package/dist/quotes/index.d.ts.map +1 -1
- package/dist/quotes/use-account-upnl.js +9 -9
- package/dist/quotes/use-close-quote-group.js +13 -13
- package/dist/quotes/use-force-cancel-close-request.d.ts.map +1 -1
- package/dist/quotes/use-force-cancel-close-request.js +1 -4
- package/dist/quotes/use-force-cancel-close-request.js.map +1 -1
- package/dist/quotes/use-force-cancel-quote.d.ts.map +1 -1
- package/dist/quotes/use-force-cancel-quote.js +1 -4
- package/dist/quotes/use-force-cancel-quote.js.map +1 -1
- package/dist/quotes/use-force-close.d.ts +2 -1
- package/dist/quotes/use-force-close.d.ts.map +1 -1
- package/dist/quotes/use-force-close.js +14 -12
- package/dist/quotes/use-force-close.js.map +1 -1
- package/dist/quotes/use-limit-orders.js +9 -9
- package/dist/quotes/use-managed-quotes.d.ts.map +1 -1
- package/dist/quotes/use-managed-quotes.js +103 -103
- package/dist/quotes/use-managed-quotes.js.map +1 -1
- package/dist/quotes/use-party-a-open-positions.js +5 -5
- package/dist/quotes/use-quote-group-funding-history.d.ts +10 -7
- package/dist/quotes/use-quote-group-funding-history.d.ts.map +1 -1
- package/dist/quotes/use-quote-group-funding-history.js.map +1 -1
- package/dist/quotes/use-quote-group-funding.d.ts +4 -2
- package/dist/quotes/use-quote-group-funding.d.ts.map +1 -1
- package/dist/quotes/use-quote-group-funding.js.map +1 -1
- package/dist/quotes/use-quote-pending-funding.d.ts +62 -0
- package/dist/quotes/use-quote-pending-funding.d.ts.map +1 -0
- package/dist/quotes/use-quote-pending-funding.js +31 -0
- package/dist/quotes/use-quote-pending-funding.js.map +1 -0
- package/dist/quotes/use-quotes-funding.d.ts +4 -2
- package/dist/quotes/use-quotes-funding.d.ts.map +1 -1
- package/dist/quotes/use-quotes-funding.js.map +1 -1
- package/dist/quotes/use-quotes-pending-funding.d.ts +92 -0
- package/dist/quotes/use-quotes-pending-funding.d.ts.map +1 -0
- package/dist/quotes/use-quotes-pending-funding.js +94 -0
- package/dist/quotes/use-quotes-pending-funding.js.map +1 -0
- package/dist/quotes/use-request-to-cancel-close-request.d.ts.map +1 -1
- package/dist/quotes/use-request-to-cancel-close-request.js +1 -4
- package/dist/quotes/use-request-to-cancel-close-request.js.map +1 -1
- package/dist/quotes/use-request-to-cancel-quote.d.ts.map +1 -1
- package/dist/quotes/use-request-to-cancel-quote.js +1 -4
- package/dist/quotes/use-request-to-cancel-quote.js.map +1 -1
- package/dist/transactions/index.js +3 -3
- package/dist/transactions/resolve-write-result.d.ts +53 -2
- package/dist/transactions/resolve-write-result.d.ts.map +1 -1
- package/dist/transactions/resolve-write-result.js +52 -9
- package/dist/transactions/resolve-write-result.js.map +1 -1
- package/dist/transactions/write-types.d.ts +19 -1
- package/dist/transactions/write-types.d.ts.map +1 -1
- package/dist/utils/predicate-match.d.ts +7 -4
- package/dist/utils/predicate-match.d.ts.map +1 -1
- package/dist/utils/predicate-match.js +5 -5
- package/dist/utils/predicate-match.js.map +1 -1
- package/dist/withdraw/use-finalize-withdraw-request.d.ts.map +1 -1
- package/dist/withdraw/use-finalize-withdraw-request.js +1 -3
- package/dist/withdraw/use-finalize-withdraw-request.js.map +1 -1
- package/dist/withdraw/use-initiate-withdraw.d.ts.map +1 -1
- package/dist/withdraw/use-initiate-withdraw.js +1 -5
- package/dist/withdraw/use-initiate-withdraw.js.map +1 -1
- package/dist/withdraw/use-request-cancel-withdraw.d.ts.map +1 -1
- package/dist/withdraw/use-request-cancel-withdraw.js +1 -3
- package/dist/withdraw/use-request-cancel-withdraw.js.map +1 -1
- package/dist/withdraw/use-withdraw.d.ts.map +1 -1
- package/dist/withdraw/use-withdraw.js +2 -1
- package/dist/withdraw/use-withdraw.js.map +1 -1
- package/package.json +6 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
//#region src/utils/predicate-match.ts
|
|
2
2
|
function e(e, t) {
|
|
3
|
-
let n = e(t), r = n[0], i = n[1] ?? {};
|
|
3
|
+
let n = e(t), r = n[0], i = n[1] ?? {}, a = t ?? {}, o = Object.entries(i).filter(([e, t]) => t !== void 0 && a[e] !== void 0);
|
|
4
4
|
return (e) => {
|
|
5
5
|
let n = e.queryKey;
|
|
6
6
|
if (n[0] !== r) return !1;
|
|
7
7
|
if (!t) return !0;
|
|
8
|
-
let
|
|
9
|
-
if (typeof
|
|
10
|
-
let
|
|
11
|
-
for (let [e, t] of
|
|
8
|
+
let i = n[1];
|
|
9
|
+
if (typeof i != "object" || !i) return !1;
|
|
10
|
+
let a = i;
|
|
11
|
+
for (let [e, t] of o) if (a[e] !== t) return !1;
|
|
12
12
|
return !0;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate-match.js","names":[],"sources":["../../src/utils/predicate-match.ts"],"sourcesContent":["import type { Query, QueryKey } from \"@tanstack/react-query\";\n\n/**\n * Build a `predicate` for `queryClient.invalidateQueries({ predicate })` from a\n * core query-key factory and an optional partial of its options.\n *\n * A cache entry matches when:\n * 1. its key's leading tag equals the factory's tag (the key's first segment), and\n * 2. for every field
|
|
1
|
+
{"version":3,"file":"predicate-match.js","names":[],"sources":["../../src/utils/predicate-match.ts"],"sourcesContent":["import type { Query, QueryKey } from \"@tanstack/react-query\";\n\n/**\n * Build a `predicate` for `queryClient.invalidateQueries({ predicate })` from a\n * core query-key factory and an optional partial of its options.\n *\n * A cache entry matches when:\n * 1. its key's leading tag equals the factory's tag (the key's first segment), and\n * 2. for every field the partial sets, the key's trailing options object has an\n * equal value. Omitted (or `undefined`) fields match anything.\n *\n * Both the partial and the stored keys are run through the same factory, so\n * `bigint` values are compared in the decimal-string form the factory emits.\n * A default the factory fills in for an omitted field (an omitted gasless\n * `walletId` keys as `0n`) is not compared, so leaving that field out still\n * matches every value of it. This enables \"invalidate every subaccount query for\n * `user`, regardless of pagination or chain\" — which TanStack's leading-prefix\n * matching can't express.\n *\n * @param keyFn - A core query-key factory, e.g. `getUserSubAccountsQueryKey`.\n * @param partial - Fields to match on. Omit to match every entry from `keyFn`.\n *\n * @example\n * ```ts\n * queryClient.invalidateQueries({\n * predicate: predicateMatch(getUserSubAccountsQueryKey, { user }),\n * });\n * ```\n */\nexport function predicateMatch<options extends object>(\n keyFn: (options?: options) => readonly unknown[],\n partial?: options,\n): (query: Query<unknown, Error, unknown, QueryKey>) => boolean {\n const reference = keyFn(partial);\n const tag = reference[0];\n const referenceFilter = (reference[1] ?? {}) as Record<string, unknown>;\n const requested = (partial ?? {}) as Record<string, unknown>;\n const fields = Object.entries(referenceFilter).filter(\n ([field, value]) => value !== undefined && requested[field] !== undefined,\n );\n\n return (query) => {\n const key = query.queryKey;\n if (key[0] !== tag) return false;\n if (!partial) return true;\n\n const segment = key[1];\n if (typeof segment !== \"object\" || segment === null) return false;\n\n const record = segment as Record<string, unknown>;\n for (const [field, value] of fields) {\n if (record[field] !== value) return false;\n }\n return true;\n };\n}\n"],"mappings":";AA6BA,SAAgB,EACd,GACA,GAC8D;CAC9D,IAAM,IAAY,EAAM,CAAO,GACzB,IAAM,EAAU,IAChB,IAAmB,EAAU,MAAM,CAAC,GACpC,IAAa,KAAW,CAAC,GACzB,IAAS,OAAO,QAAQ,CAAe,EAAE,QAC5C,CAAC,GAAO,OAAW,MAAU,KAAA,KAAa,EAAU,OAAW,KAAA,CAClE;CAEA,QAAQ,MAAU;EAChB,IAAM,IAAM,EAAM;EAClB,IAAI,EAAI,OAAO,GAAK,OAAO;EAC3B,IAAI,CAAC,GAAS,OAAO;EAErB,IAAM,IAAU,EAAI;EACpB,IAAI,OAAO,KAAY,aAAY,GAAkB,OAAO;EAE5D,IAAM,IAAS;EACf,KAAK,IAAM,CAAC,GAAO,MAAU,GAC3B,IAAI,EAAO,OAAW,GAAO,OAAO;EAEtC,OAAO;CACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-finalize-withdraw-request.d.ts","sourceRoot":"","sources":["../../src/withdraw/use-finalize-withdraw-request.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,iCAAiC,EACvC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,OAAO,EAAsB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7F;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,eAAe,CAAC;AAEnE,0EAA0E;AAC1E,MAAM,MAAM,6BAA6B,GAAG,WAAW,CAAC;AAExD,yDAAyD;AACzD,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAClE,6BAA6B,EAC7B,kBAAkB,EAClB,iCAAiC,CAClC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,GAAE,oCAAyC,GACpD,oCAAoC,
|
|
1
|
+
{"version":3,"file":"use-finalize-withdraw-request.d.ts","sourceRoot":"","sources":["../../src/withdraw/use-finalize-withdraw-request.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,iCAAiC,EACvC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,OAAO,EAAsB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7F;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,eAAe,CAAC;AAEnE,0EAA0E;AAC1E,MAAM,MAAM,6BAA6B,GAAG,WAAW,CAAC;AAExD,yDAAyD;AACzD,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAClE,6BAA6B,EAC7B,kBAAkB,EAClB,iCAAiC,CAClC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,GAAE,oCAAyC,GACpD,oCAAoC,CA6BtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-finalize-withdraw-request.js","names":[],"sources":["../../src/withdraw/use-finalize-withdraw-request.ts"],"sourcesContent":["\"use client\";\n\nimport {\n finalizeWithdrawRequestMutationOptions,\n getPendingWithdrawRequestsQueryKey,\n getWithdrawRequestsQueryKey,\n getWithdrawableTimeQueryKey,\n type FinalizeWithdrawRequestParameters,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\nimport { resolveWriteResult, type WriteParameters, type WriteResult } from \"../transactions\";\nimport { predicateMatch } from \"../utils\";\n\n/**\n * Parameters for {@link useFinalizeWithdrawRequest}.\n */\nexport type UseFinalizeWithdrawRequestParameters = WriteParameters;\n\n/** Result returned by the {@link useFinalizeWithdrawRequest} mutation. */\nexport type FinalizeWithdrawRequestResult = WriteResult;\n\n/** Return type of {@link useFinalizeWithdrawRequest}. */\nexport type UseFinalizeWithdrawRequestReturnType = UseMutationResult<\n FinalizeWithdrawRequestResult,\n SymmioRequestError,\n FinalizeWithdrawRequestParameters\n>;\n\n/**\n * Finalize a matured withdraw request, paying out collateral to its receivers.\n * The underlying core call is permissionless, so any connected wallet may submit\n * it. On success, the subaccount's pending-requests, single-request, and\n * withdrawable-time queries are invalidated.\n *\n * @example\n * ```tsx\n * const { mutate } = useFinalizeWithdrawRequest();\n * mutate({ user: \"0xsub…\", requestId: 1n });\n * ```\n */\nexport function useFinalizeWithdrawRequest(\n parameters: UseFinalizeWithdrawRequestParameters = {},\n): UseFinalizeWithdrawRequestReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n\n const base = finalizeWithdrawRequestMutationOptions(config);\n\n return useMutation<FinalizeWithdrawRequestResult, SymmioRequestError, FinalizeWithdrawRequestParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n const resolvedChainId = variables.chainId ?? chainId;\n const hash = await base.mutationFn({
|
|
1
|
+
{"version":3,"file":"use-finalize-withdraw-request.js","names":[],"sources":["../../src/withdraw/use-finalize-withdraw-request.ts"],"sourcesContent":["\"use client\";\n\nimport {\n finalizeWithdrawRequestMutationOptions,\n getPendingWithdrawRequestsQueryKey,\n getWithdrawRequestsQueryKey,\n getWithdrawableTimeQueryKey,\n type FinalizeWithdrawRequestParameters,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\nimport { resolveWriteResult, type WriteParameters, type WriteResult } from \"../transactions\";\nimport { predicateMatch } from \"../utils\";\n\n/**\n * Parameters for {@link useFinalizeWithdrawRequest}.\n */\nexport type UseFinalizeWithdrawRequestParameters = WriteParameters;\n\n/** Result returned by the {@link useFinalizeWithdrawRequest} mutation. */\nexport type FinalizeWithdrawRequestResult = WriteResult;\n\n/** Return type of {@link useFinalizeWithdrawRequest}. */\nexport type UseFinalizeWithdrawRequestReturnType = UseMutationResult<\n FinalizeWithdrawRequestResult,\n SymmioRequestError,\n FinalizeWithdrawRequestParameters\n>;\n\n/**\n * Finalize a matured withdraw request, paying out collateral to its receivers.\n * The underlying core call is permissionless, so any connected wallet may submit\n * it. On success, the subaccount's pending-requests, single-request, and\n * withdrawable-time queries are invalidated.\n *\n * @example\n * ```tsx\n * const { mutate } = useFinalizeWithdrawRequest();\n * mutate({ user: \"0xsub…\", requestId: 1n });\n * ```\n */\nexport function useFinalizeWithdrawRequest(\n parameters: UseFinalizeWithdrawRequestParameters = {},\n): UseFinalizeWithdrawRequestReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n\n const base = finalizeWithdrawRequestMutationOptions(config);\n\n return useMutation<FinalizeWithdrawRequestResult, SymmioRequestError, FinalizeWithdrawRequestParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n const resolvedChainId = variables.chainId ?? chainId;\n const hash = await base.mutationFn({ ...variables, chainId: resolvedChainId });\n return resolveWriteResult(config, hash, {\n chainId: resolvedChainId,\n waitForReceipt: parameters.waitForReceipt,\n confirmations: parameters.confirmations,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n onSuccess: (_result, variables) => {\n const partial = { user: variables.user };\n void queryClient.invalidateQueries({ predicate: predicateMatch(getPendingWithdrawRequestsQueryKey, partial) });\n void queryClient.invalidateQueries({ predicate: predicateMatch(getWithdrawRequestsQueryKey, partial) });\n void queryClient.invalidateQueries({ predicate: predicateMatch(getWithdrawableTimeQueryKey, partial) });\n },\n });\n}\n"],"mappings":";;;;;;;;;AA4CA,SAAgB,EACd,IAAmD,CAAC,GACd;CACtC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAc,EAAe,GAE7B,IAAO,EAAuC,CAAM;CAE1D,OAAO,EAAkG;EACvG,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,IAAM,IAAkB,EAAU,WAAW;IAE7C,OAAO,EAAmB,GAAQ,MADf,EAAK,WAAW;KAAE,GAAG;KAAW,SAAS;IAAgB,CAAC,GACrC;KACtC,SAAS;KACT,gBAAgB,EAAW;KAC3B,eAAe,EAAW;IAC5B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;EACA,YAAY,GAAS,MAAc;GACjC,IAAM,IAAU,EAAE,MAAM,EAAU,KAAK;GAGvC,AAFA,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAAoC,CAAO,EAAE,CAAC,GAC7G,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAA6B,CAAO,EAAE,CAAC,GACtG,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAA6B,CAAO,EAAE,CAAC;EACxG;CACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-initiate-withdraw.d.ts","sourceRoot":"","sources":["../../src/withdraw/use-initiate-withdraw.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,0BAA0B,EAChC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,OAAO,EAAsB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7F;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,eAAe,CAAC;AAE5D,mEAAmE;AACnE,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAEjD,kDAAkD;AAClD,MAAM,MAAM,6BAA6B,GAAG,iBAAiB,CAC3D,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,CAC3B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,GAAE,6BAAkC,GAAG,6BAA6B,
|
|
1
|
+
{"version":3,"file":"use-initiate-withdraw.d.ts","sourceRoot":"","sources":["../../src/withdraw/use-initiate-withdraw.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,0BAA0B,EAChC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,OAAO,EAAsB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7F;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,eAAe,CAAC;AAE5D,mEAAmE;AACnE,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAEjD,kDAAkD;AAClD,MAAM,MAAM,6BAA6B,GAAG,iBAAiB,CAC3D,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,CAC3B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,GAAE,6BAAkC,GAAG,6BAA6B,CA6BjH"}
|
|
@@ -15,11 +15,7 @@ function d(d = {}) {
|
|
|
15
15
|
try {
|
|
16
16
|
let t = e.chainId ?? p;
|
|
17
17
|
return r(f, await h.mutationFn({
|
|
18
|
-
|
|
19
|
-
parts: e.parts,
|
|
20
|
-
speedUp: e.speedUp,
|
|
21
|
-
providerData: e.providerData,
|
|
22
|
-
simulateBeforeWrite: e.simulateBeforeWrite,
|
|
18
|
+
...e,
|
|
23
19
|
chainId: t
|
|
24
20
|
}), {
|
|
25
21
|
chainId: t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-initiate-withdraw.js","names":[],"sources":["../../src/withdraw/use-initiate-withdraw.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getLastWithdrawRequestIdQueryKey,\n getPendingWithdrawRequestsQueryKey,\n getWithdrawableTimeQueryKey,\n initiateWithdrawMutationOptions,\n type InitiateWithdrawParameters,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\nimport { resolveWriteResult, type WriteParameters, type WriteResult } from \"../transactions\";\nimport { predicateMatch } from \"../utils\";\n\n/**\n * Parameters for {@link useInitiateWithdraw}.\n */\nexport type UseInitiateWithdrawParameters = WriteParameters;\n\n/** Result returned by the {@link useInitiateWithdraw} mutation. */\nexport type InitiateWithdrawResult = WriteResult;\n\n/** Return type of {@link useInitiateWithdraw}. */\nexport type UseInitiateWithdrawReturnType = UseMutationResult<\n InitiateWithdrawResult,\n SymmioRequestError,\n InitiateWithdrawParameters\n>;\n\n/**\n * Open a withdraw request for a subaccount (the SDK routes it through the\n * AccountLayer `_call` proxy). The full input surface is exposed via the mutation\n * variables — `parts`, `speedUp`, `providerData`. On success, the subaccount's\n * pending-requests, last-request-id, and withdrawable-time queries are\n * invalidated.\n *\n * @example\n * ```tsx\n * import { createClassicWithdrawPart } from \"@symmio/trading-core\";\n * const { mutate } = useInitiateWithdraw();\n * mutate({ account: \"0xsub…\", parts: [createClassicWithdrawPart({ id: 0n, amount, receiver, chainId: 42161n })] });\n * ```\n */\nexport function useInitiateWithdraw(parameters: UseInitiateWithdrawParameters = {}): UseInitiateWithdrawReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n\n const base = initiateWithdrawMutationOptions(config);\n\n return useMutation<InitiateWithdrawResult, SymmioRequestError, InitiateWithdrawParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n const resolvedChainId = variables.chainId ?? chainId;\n const hash = await base.mutationFn({
|
|
1
|
+
{"version":3,"file":"use-initiate-withdraw.js","names":[],"sources":["../../src/withdraw/use-initiate-withdraw.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getLastWithdrawRequestIdQueryKey,\n getPendingWithdrawRequestsQueryKey,\n getWithdrawableTimeQueryKey,\n initiateWithdrawMutationOptions,\n type InitiateWithdrawParameters,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\nimport { resolveWriteResult, type WriteParameters, type WriteResult } from \"../transactions\";\nimport { predicateMatch } from \"../utils\";\n\n/**\n * Parameters for {@link useInitiateWithdraw}.\n */\nexport type UseInitiateWithdrawParameters = WriteParameters;\n\n/** Result returned by the {@link useInitiateWithdraw} mutation. */\nexport type InitiateWithdrawResult = WriteResult;\n\n/** Return type of {@link useInitiateWithdraw}. */\nexport type UseInitiateWithdrawReturnType = UseMutationResult<\n InitiateWithdrawResult,\n SymmioRequestError,\n InitiateWithdrawParameters\n>;\n\n/**\n * Open a withdraw request for a subaccount (the SDK routes it through the\n * AccountLayer `_call` proxy). The full input surface is exposed via the mutation\n * variables — `parts`, `speedUp`, `providerData`. On success, the subaccount's\n * pending-requests, last-request-id, and withdrawable-time queries are\n * invalidated.\n *\n * @example\n * ```tsx\n * import { createClassicWithdrawPart } from \"@symmio/trading-core\";\n * const { mutate } = useInitiateWithdraw();\n * mutate({ account: \"0xsub…\", parts: [createClassicWithdrawPart({ id: 0n, amount, receiver, chainId: 42161n })] });\n * ```\n */\nexport function useInitiateWithdraw(parameters: UseInitiateWithdrawParameters = {}): UseInitiateWithdrawReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n\n const base = initiateWithdrawMutationOptions(config);\n\n return useMutation<InitiateWithdrawResult, SymmioRequestError, InitiateWithdrawParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n const resolvedChainId = variables.chainId ?? chainId;\n const hash = await base.mutationFn({ ...variables, chainId: resolvedChainId });\n return resolveWriteResult(config, hash, {\n chainId: resolvedChainId,\n waitForReceipt: parameters.waitForReceipt,\n confirmations: parameters.confirmations,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n onSuccess: (_result, variables) => {\n const partial = { user: variables.account };\n void queryClient.invalidateQueries({ predicate: predicateMatch(getPendingWithdrawRequestsQueryKey, partial) });\n void queryClient.invalidateQueries({ predicate: predicateMatch(getLastWithdrawRequestIdQueryKey, partial) });\n void queryClient.invalidateQueries({ predicate: predicateMatch(getWithdrawableTimeQueryKey, partial) });\n },\n });\n}\n"],"mappings":";;;;;;;;;AA8CA,SAAgB,EAAoB,IAA4C,CAAC,GAAkC;CACjH,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAc,EAAe,GAE7B,IAAO,EAAgC,CAAM;CAEnD,OAAO,EAAoF;EACzF,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,IAAM,IAAkB,EAAU,WAAW;IAE7C,OAAO,EAAmB,GAAQ,MADf,EAAK,WAAW;KAAE,GAAG;KAAW,SAAS;IAAgB,CAAC,GACrC;KACtC,SAAS;KACT,gBAAgB,EAAW;KAC3B,eAAe,EAAW;IAC5B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;EACA,YAAY,GAAS,MAAc;GACjC,IAAM,IAAU,EAAE,MAAM,EAAU,QAAQ;GAG1C,AAFA,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAAoC,CAAO,EAAE,CAAC,GAC7G,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAAkC,CAAO,EAAE,CAAC,GAC3G,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAA6B,CAAO,EAAE,CAAC;EACxG;CACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-request-cancel-withdraw.d.ts","sourceRoot":"","sources":["../../src/withdraw/use-request-cancel-withdraw.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,+BAA+B,EACrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,OAAO,EAAsB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7F;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,eAAe,CAAC;AAEjE,wEAAwE;AACxE,MAAM,MAAM,2BAA2B,GAAG,WAAW,CAAC;AAEtD,uDAAuD;AACvD,MAAM,MAAM,kCAAkC,GAAG,iBAAiB,CAChE,2BAA2B,EAC3B,kBAAkB,EAClB,+BAA+B,CAChC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,GAAE,kCAAuC,GAClD,kCAAkC,
|
|
1
|
+
{"version":3,"file":"use-request-cancel-withdraw.d.ts","sourceRoot":"","sources":["../../src/withdraw/use-request-cancel-withdraw.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,+BAA+B,EACrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,OAAO,EAAsB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7F;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,eAAe,CAAC;AAEjE,wEAAwE;AACxE,MAAM,MAAM,2BAA2B,GAAG,WAAW,CAAC;AAEtD,uDAAuD;AACvD,MAAM,MAAM,kCAAkC,GAAG,iBAAiB,CAChE,2BAA2B,EAC3B,kBAAkB,EAClB,+BAA+B,CAChC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,GAAE,kCAAuC,GAClD,kCAAkC,CAoCpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-request-cancel-withdraw.js","names":[],"sources":["../../src/withdraw/use-request-cancel-withdraw.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getAccountBalanceInfoQueryKey,\n getAccountBalanceOfQueryKey,\n getPendingWithdrawRequestsQueryKey,\n getWithdrawRequestsQueryKey,\n requestCancelWithdrawMutationOptions,\n type RequestCancelWithdrawParameters,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\nimport { resolveWriteResult, type WriteParameters, type WriteResult } from \"../transactions\";\nimport { predicateMatch } from \"../utils\";\n\n/**\n * Parameters for {@link useRequestCancelWithdraw}.\n */\nexport type UseRequestCancelWithdrawParameters = WriteParameters;\n\n/** Result returned by the {@link useRequestCancelWithdraw} mutation. */\nexport type RequestCancelWithdrawResult = WriteResult;\n\n/** Return type of {@link useRequestCancelWithdraw}. */\nexport type UseRequestCancelWithdrawReturnType = UseMutationResult<\n RequestCancelWithdrawResult,\n SymmioRequestError,\n RequestCancelWithdrawParameters\n>;\n\n/**\n * Request cancellation of a pending withdraw request (routed through the\n * AccountLayer `_call` proxy). On success (after the receipt), the subaccount's\n * balance reads (`balanceInfo`, `balanceOf`) and its pending-requests / requests\n * queries are invalidated — cancel returns the reserved funds to the available\n * balance.\n *\n * @example\n * ```tsx\n * const { mutate } = useRequestCancelWithdraw();\n * mutate({ account: \"0xsub…\", requestId: 1n });\n * ```\n */\nexport function useRequestCancelWithdraw(\n parameters: UseRequestCancelWithdrawParameters = {},\n): UseRequestCancelWithdrawReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n\n const base = requestCancelWithdrawMutationOptions(config);\n\n return useMutation<RequestCancelWithdrawResult, SymmioRequestError, RequestCancelWithdrawParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n const resolvedChainId = variables.chainId ?? chainId;\n const hash = await base.mutationFn({
|
|
1
|
+
{"version":3,"file":"use-request-cancel-withdraw.js","names":[],"sources":["../../src/withdraw/use-request-cancel-withdraw.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getAccountBalanceInfoQueryKey,\n getAccountBalanceOfQueryKey,\n getPendingWithdrawRequestsQueryKey,\n getWithdrawRequestsQueryKey,\n requestCancelWithdrawMutationOptions,\n type RequestCancelWithdrawParameters,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\nimport { resolveWriteResult, type WriteParameters, type WriteResult } from \"../transactions\";\nimport { predicateMatch } from \"../utils\";\n\n/**\n * Parameters for {@link useRequestCancelWithdraw}.\n */\nexport type UseRequestCancelWithdrawParameters = WriteParameters;\n\n/** Result returned by the {@link useRequestCancelWithdraw} mutation. */\nexport type RequestCancelWithdrawResult = WriteResult;\n\n/** Return type of {@link useRequestCancelWithdraw}. */\nexport type UseRequestCancelWithdrawReturnType = UseMutationResult<\n RequestCancelWithdrawResult,\n SymmioRequestError,\n RequestCancelWithdrawParameters\n>;\n\n/**\n * Request cancellation of a pending withdraw request (routed through the\n * AccountLayer `_call` proxy). On success (after the receipt), the subaccount's\n * balance reads (`balanceInfo`, `balanceOf`) and its pending-requests / requests\n * queries are invalidated — cancel returns the reserved funds to the available\n * balance.\n *\n * @example\n * ```tsx\n * const { mutate } = useRequestCancelWithdraw();\n * mutate({ account: \"0xsub…\", requestId: 1n });\n * ```\n */\nexport function useRequestCancelWithdraw(\n parameters: UseRequestCancelWithdrawParameters = {},\n): UseRequestCancelWithdrawReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n\n const base = requestCancelWithdrawMutationOptions(config);\n\n return useMutation<RequestCancelWithdrawResult, SymmioRequestError, RequestCancelWithdrawParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n const resolvedChainId = variables.chainId ?? chainId;\n const hash = await base.mutationFn({ ...variables, chainId: resolvedChainId });\n return resolveWriteResult(config, hash, {\n chainId: resolvedChainId,\n waitForReceipt: parameters.waitForReceipt,\n confirmations: parameters.confirmations,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n onSuccess: (_result, variables) => {\n // Cancel returns the reserved funds to the subaccount's available balance and\n // removes the request — refetch balances + the withdraw lists (after the receipt).\n const balancePartial = { account: variables.account };\n void queryClient.invalidateQueries({ predicate: predicateMatch(getAccountBalanceInfoQueryKey, balancePartial) });\n void queryClient.invalidateQueries({ predicate: predicateMatch(getAccountBalanceOfQueryKey, balancePartial) });\n\n const withdrawPartial = { user: variables.account };\n void queryClient.invalidateQueries({\n predicate: predicateMatch(getPendingWithdrawRequestsQueryKey, withdrawPartial),\n });\n void queryClient.invalidateQueries({ predicate: predicateMatch(getWithdrawRequestsQueryKey, withdrawPartial) });\n },\n });\n}\n"],"mappings":";;;;;;;;;AA8CA,SAAgB,EACd,IAAiD,CAAC,GACd;CACpC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAc,EAAe,GAE7B,IAAO,EAAqC,CAAM;CAExD,OAAO,EAA8F;EACnG,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,IAAM,IAAkB,EAAU,WAAW;IAE7C,OAAO,EAAmB,GAAQ,MADf,EAAK,WAAW;KAAE,GAAG;KAAW,SAAS;IAAgB,CAAC,GACrC;KACtC,SAAS;KACT,gBAAgB,EAAW;KAC3B,eAAe,EAAW;IAC5B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;EACA,YAAY,GAAS,MAAc;GAGjC,IAAM,IAAiB,EAAE,SAAS,EAAU,QAAQ;GAEpD,AADA,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAA+B,CAAc,EAAE,CAAC,GAC/G,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAA6B,CAAc,EAAE,CAAC;GAE7G,IAAM,IAAkB,EAAE,MAAM,EAAU,QAAQ;GAIlD,AAHA,EAAiB,kBAAkB,EACjC,WAAW,EAAe,GAAoC,CAAe,EAC/E,CAAC,GACD,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAA6B,CAAe,EAAE,CAAC;EAChH;CACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-withdraw.d.ts","sourceRoot":"","sources":["../../src/withdraw/use-withdraw.ts"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,OAAO,EAAsB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7F;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG;IACpD,wFAAwF;IACxF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,eAAe,GAAG,SAAS,CAAC,CAAC;AAEzG,2DAA2D;AAC3D,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC;AAEzC,0CAA0C;AAC1C,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,cAAc,EAAE,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;AAEhH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,WAAW,CAAC,UAAU,GAAE,qBAA0B,GAAG,qBAAqB,
|
|
1
|
+
{"version":3,"file":"use-withdraw.d.ts","sourceRoot":"","sources":["../../src/withdraw/use-withdraw.ts"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,OAAO,EAAsB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7F;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG;IACpD,wFAAwF;IACxF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,eAAe,GAAG,SAAS,CAAC,CAAC;AAEzG,2DAA2D;AAC3D,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC;AAEzC,0CAA0C;AAC1C,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,cAAc,EAAE,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;AAEhH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,WAAW,CAAC,UAAU,GAAE,qBAA0B,GAAG,qBAAqB,CAqDzF"}
|
|
@@ -11,7 +11,8 @@ import { useMutation as f, useQueryClient as p } from "@tanstack/react-query";
|
|
|
11
11
|
function m(m = {}) {
|
|
12
12
|
let h = t(m), g = e(), _ = p(), v = m.chainId ?? g, { data: y } = a({
|
|
13
13
|
account: m.account,
|
|
14
|
-
chainId: m.chainId
|
|
14
|
+
chainId: m.chainId,
|
|
15
|
+
config: m.config
|
|
15
16
|
}), b = y?.isolationType, x = d(h);
|
|
16
17
|
return f({
|
|
17
18
|
mutationKey: x.mutationKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-withdraw.js","names":[],"sources":["../../src/withdraw/use-withdraw.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getAccountBalanceInfoQueryKey,\n getAccountBalanceOfQueryKey,\n getPendingWithdrawRequestsQueryKey,\n getWithdrawableTimeQueryKey,\n SymmError,\n withdrawAutoMutationOptions,\n type WithdrawAutoParameters,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } from \"@tanstack/react-query\";\nimport type { Address } from \"viem\";\nimport { useSubAccount } from \"../account-layer/use-sub-account\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\nimport { resolveWriteResult, type WriteParameters, type WriteResult } from \"../transactions\";\nimport { predicateMatch } from \"../utils\";\n\n/**\n * Parameters for {@link useWithdraw}. `account` (the subaccount) and `chainId` are\n * read at hook time so the hook can resolve the subaccount's isolation type via\n * {@link useSubAccount}; the per-withdraw inputs (`amount`, `receiver`, …) are the\n * mutation variables.\n */\nexport type UseWithdrawParameters = WriteParameters & {\n /** The subaccount to withdraw from. The connected wallet must be its on-chain owner. */\n account?: Address;\n /** Target chain id. Defaults to the connected chain. */\n chainId?: number;\n};\n\n/**\n * Variables for the {@link useWithdraw} mutation — the per-withdraw inputs, with\n * `amount` in the **collateral token's decimals**. `account`, `chainId`, and\n * `isolationType` are supplied by the hook, so the caller never passes them (nor\n * `parts`). `upnlSig` is optional; on the `CUSTOM` path a fresh Muon uPnL signature\n * is fetched for the deallocate leg when omitted.\n */\nexport type UseWithdrawVariables = Omit<WithdrawAutoParameters, \"account\" | \"isolationType\" | \"chainId\">;\n\n/** Result returned by the {@link useWithdraw} mutation. */\nexport type WithdrawResult = WriteResult;\n\n/** Return type of {@link useWithdraw}. */\nexport type UseWithdrawReturnType = UseMutationResult<WithdrawResult, SymmioRequestError, UseWithdrawVariables>;\n\n/**\n * Withdraw from a subaccount from a **minimal, collateral-decimals input** — the\n * high-level entry point that hides isolation, parts, and amount scaling.\n *\n * Pass the `account` (and optional `chainId`) to the hook; call `mutate` with just\n * `{ amount, receiver }`. The hook reads the subaccount's `isolationType` with\n * {@link useSubAccount} (deduped with any other `useSubAccount` on the same key —\n * e.g. one already driving a balance display) and hands it to the SDK, so the core\n * action skips a redundant on-chain read and picks the path: a `CUSTOM`\n * (cross-margin) subaccount deallocates then initiates in one atomic transaction; a\n * `MARKET` / `MARKET_DIRECTION` (VA / lowcap) subaccount only initiates the withdraw\n * request. On a cache miss the core action resolves `isolationType` itself.\n *\n * `amount` is in the **collateral token's decimals** (e.g. 6 for USDC). The hook\n * builds the classic same-chain withdraw part from it and, on the `CUSTOM` path,\n * scales it to the 18-decimal amount the deallocate leg needs — the caller does not\n * scale anything.\n *\n * On success, the subaccount's balance reads (`balanceInfo`, `balanceOf`) and its\n * pending-requests / withdrawable-time reads are invalidated.\n *\n * @remarks\n * On the `CUSTOM` path the SDK fetches a fresh Muon uPnL signature for the\n * deallocate leg unless you pass one as `upnlSig`; that leg is subject to the\n * on-chain deallocate debounce. Failures surface as a normalized\n * {@link SymmioRequestError}. Reach for `useDeallocateAndInitiateWithdraw` /\n * `useInitiateWithdraw` when you already know the isolation and want to drive one\n * specific path, or need custom (multi-part / cross-chain) withdraw parts.\n *\n * @example\n * ```tsx\n * const { mutate } = useWithdraw({ account: \"0xsub…\" });\n * // amount in the collateral token's decimals (6-dec USDC → 1 USDC):\n * mutate({ amount: 1_000000n, receiver: \"0xabc…\" });\n * ```\n */\nexport function useWithdraw(parameters: UseWithdrawParameters = {}): UseWithdrawReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n const resolvedChainId = parameters.chainId ?? chainId;\n\n // Resolve the subaccount's isolation type via the standard hook (deduped by\n // react-query with any other useSubAccount on the same key), so the core action\n // skips a redundant getSubAccount RPC.\n const { data: subAccount } = useSubAccount({
|
|
1
|
+
{"version":3,"file":"use-withdraw.js","names":[],"sources":["../../src/withdraw/use-withdraw.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getAccountBalanceInfoQueryKey,\n getAccountBalanceOfQueryKey,\n getPendingWithdrawRequestsQueryKey,\n getWithdrawableTimeQueryKey,\n SymmError,\n withdrawAutoMutationOptions,\n type WithdrawAutoParameters,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } from \"@tanstack/react-query\";\nimport type { Address } from \"viem\";\nimport { useSubAccount } from \"../account-layer/use-sub-account\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\nimport { resolveWriteResult, type WriteParameters, type WriteResult } from \"../transactions\";\nimport { predicateMatch } from \"../utils\";\n\n/**\n * Parameters for {@link useWithdraw}. `account` (the subaccount) and `chainId` are\n * read at hook time so the hook can resolve the subaccount's isolation type via\n * {@link useSubAccount}; the per-withdraw inputs (`amount`, `receiver`, …) are the\n * mutation variables.\n */\nexport type UseWithdrawParameters = WriteParameters & {\n /** The subaccount to withdraw from. The connected wallet must be its on-chain owner. */\n account?: Address;\n /** Target chain id. Defaults to the connected chain. */\n chainId?: number;\n};\n\n/**\n * Variables for the {@link useWithdraw} mutation — the per-withdraw inputs, with\n * `amount` in the **collateral token's decimals**. `account`, `chainId`, and\n * `isolationType` are supplied by the hook, so the caller never passes them (nor\n * `parts`). `upnlSig` is optional; on the `CUSTOM` path a fresh Muon uPnL signature\n * is fetched for the deallocate leg when omitted.\n */\nexport type UseWithdrawVariables = Omit<WithdrawAutoParameters, \"account\" | \"isolationType\" | \"chainId\">;\n\n/** Result returned by the {@link useWithdraw} mutation. */\nexport type WithdrawResult = WriteResult;\n\n/** Return type of {@link useWithdraw}. */\nexport type UseWithdrawReturnType = UseMutationResult<WithdrawResult, SymmioRequestError, UseWithdrawVariables>;\n\n/**\n * Withdraw from a subaccount from a **minimal, collateral-decimals input** — the\n * high-level entry point that hides isolation, parts, and amount scaling.\n *\n * Pass the `account` (and optional `chainId`) to the hook; call `mutate` with just\n * `{ amount, receiver }`. The hook reads the subaccount's `isolationType` with\n * {@link useSubAccount} (deduped with any other `useSubAccount` on the same key —\n * e.g. one already driving a balance display) and hands it to the SDK, so the core\n * action skips a redundant on-chain read and picks the path: a `CUSTOM`\n * (cross-margin) subaccount deallocates then initiates in one atomic transaction; a\n * `MARKET` / `MARKET_DIRECTION` (VA / lowcap) subaccount only initiates the withdraw\n * request. On a cache miss the core action resolves `isolationType` itself.\n *\n * `amount` is in the **collateral token's decimals** (e.g. 6 for USDC). The hook\n * builds the classic same-chain withdraw part from it and, on the `CUSTOM` path,\n * scales it to the 18-decimal amount the deallocate leg needs — the caller does not\n * scale anything.\n *\n * On success, the subaccount's balance reads (`balanceInfo`, `balanceOf`) and its\n * pending-requests / withdrawable-time reads are invalidated.\n *\n * @remarks\n * On the `CUSTOM` path the SDK fetches a fresh Muon uPnL signature for the\n * deallocate leg unless you pass one as `upnlSig`; that leg is subject to the\n * on-chain deallocate debounce. Failures surface as a normalized\n * {@link SymmioRequestError}. Reach for `useDeallocateAndInitiateWithdraw` /\n * `useInitiateWithdraw` when you already know the isolation and want to drive one\n * specific path, or need custom (multi-part / cross-chain) withdraw parts.\n *\n * @example\n * ```tsx\n * const { mutate } = useWithdraw({ account: \"0xsub…\" });\n * // amount in the collateral token's decimals (6-dec USDC → 1 USDC):\n * mutate({ amount: 1_000000n, receiver: \"0xabc…\" });\n * ```\n */\nexport function useWithdraw(parameters: UseWithdrawParameters = {}): UseWithdrawReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n const resolvedChainId = parameters.chainId ?? chainId;\n\n // Resolve the subaccount's isolation type via the standard hook (deduped by\n // react-query with any other useSubAccount on the same key), so the core action\n // skips a redundant getSubAccount RPC.\n const { data: subAccount } = useSubAccount({\n account: parameters.account,\n chainId: parameters.chainId,\n config: parameters.config,\n });\n const isolationType = subAccount?.isolationType;\n\n const base = withdrawAutoMutationOptions(config);\n\n return useMutation<WithdrawResult, SymmioRequestError, UseWithdrawVariables>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n const account = parameters.account;\n if (!account) {\n throw new SymmError(\"validation\", \"MISSING_ACCOUNT\", \"useWithdraw: `account` must be set on the hook.\");\n }\n const hash = await base.mutationFn({ ...variables, account, chainId: resolvedChainId, isolationType });\n return resolveWriteResult(config, hash, {\n chainId: resolvedChainId,\n waitForReceipt: parameters.waitForReceipt,\n confirmations: parameters.confirmations,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n onSuccess: () => {\n const account = parameters.account;\n if (!account) return;\n\n const balancePartial = { account };\n void queryClient.invalidateQueries({ predicate: predicateMatch(getAccountBalanceInfoQueryKey, balancePartial) });\n void queryClient.invalidateQueries({ predicate: predicateMatch(getAccountBalanceOfQueryKey, balancePartial) });\n\n const withdrawPartial = { user: account };\n void queryClient.invalidateQueries({\n predicate: predicateMatch(getPendingWithdrawRequestsQueryKey, withdrawPartial),\n });\n void queryClient.invalidateQueries({\n predicate: predicateMatch(getWithdrawableTimeQueryKey, withdrawPartial),\n });\n },\n });\n}\n"],"mappings":";;;;;;;;;;AAqFA,SAAgB,EAAY,IAAoC,CAAC,GAA0B;CACzF,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAc,EAAe,GAC7B,IAAkB,EAAW,WAAW,GAKxC,EAAE,MAAM,MAAe,EAAc;EACzC,SAAS,EAAW;EACpB,SAAS,EAAW;EACpB,QAAQ,EAAW;CACrB,CAAC,GACK,IAAgB,GAAY,eAE5B,IAAO,EAA4B,CAAM;CAE/C,OAAO,EAAsE;EAC3E,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,IAAM,IAAU,EAAW;IAC3B,IAAI,CAAC,GACH,MAAM,IAAI,EAAU,cAAc,mBAAmB,iDAAiD;IAGxG,OAAO,EAAmB,GAAQ,MADf,EAAK,WAAW;KAAE,GAAG;KAAW;KAAS,SAAS;KAAiB;IAAc,CAAC,GAC7D;KACtC,SAAS;KACT,gBAAgB,EAAW;KAC3B,eAAe,EAAW;IAC5B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;EACA,iBAAiB;GACf,IAAM,IAAU,EAAW;GAC3B,IAAI,CAAC,GAAS;GAEd,IAAM,IAAiB,EAAE,WAAQ;GAEjC,AADA,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAA+B,CAAc,EAAE,CAAC,GAC/G,EAAiB,kBAAkB,EAAE,WAAW,EAAe,GAA6B,CAAc,EAAE,CAAC;GAE7G,IAAM,IAAkB,EAAE,MAAM,EAAQ;GAIxC,AAHA,EAAiB,kBAAkB,EACjC,WAAW,EAAe,GAAoC,CAAe,EAC/E,CAAC,GACD,EAAiB,kBAAkB,EACjC,WAAW,EAAe,GAA6B,CAAe,EACxE,CAAC;EACH;CACF,CAAC;AACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symmio/trading-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "React adapter for the SYMMIO SDK. Hooks, providers, and React-bound ergonomics on top of @symmio/trading-core.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/SYMM-IO/Trading-SDK/tree/main/packages/trading-react#readme",
|
|
@@ -72,6 +72,10 @@
|
|
|
72
72
|
"types": "./dist/inventory/index.d.ts",
|
|
73
73
|
"import": "./dist/inventory/index.js"
|
|
74
74
|
},
|
|
75
|
+
"./gasless": {
|
|
76
|
+
"types": "./dist/gasless/index.d.ts",
|
|
77
|
+
"import": "./dist/gasless/index.js"
|
|
78
|
+
},
|
|
75
79
|
"./*": {
|
|
76
80
|
"types": "./dist/*.d.ts",
|
|
77
81
|
"import": "./dist/*.js"
|
|
@@ -87,7 +91,7 @@
|
|
|
87
91
|
"@tanstack/react-query": "^5.100.0",
|
|
88
92
|
"decimal.js": "^10.4.3",
|
|
89
93
|
"zustand": "^5.0.0",
|
|
90
|
-
"@symmio/trading-core": "^3.
|
|
94
|
+
"@symmio/trading-core": "^3.1.0"
|
|
91
95
|
},
|
|
92
96
|
"peerDependencies": {
|
|
93
97
|
"react": "^19.0.0",
|