@symmio/trading-core 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/core/chains/types.d.ts +197 -0
- package/dist/core/chains/types.d.ts.map +1 -1
- package/dist/core/chains/types.js.map +1 -1
- package/dist/core/config/merge-chain-config.d.ts.map +1 -1
- package/dist/core/config/merge-chain-config.js +49 -19
- package/dist/core/config/merge-chain-config.js.map +1 -1
- package/dist/gasless/abortable-sleep.d.ts +17 -0
- package/dist/gasless/abortable-sleep.d.ts.map +1 -0
- package/dist/gasless/abortable-sleep.js +21 -0
- package/dist/gasless/abortable-sleep.js.map +1 -0
- package/dist/gasless/assert-gateway-coherence.d.ts +20 -0
- package/dist/gasless/assert-gateway-coherence.d.ts.map +1 -0
- package/dist/gasless/assert-gateway-coherence.js +26 -0
- package/dist/gasless/assert-gateway-coherence.js.map +1 -0
- package/dist/gasless/batch/calls.d.ts +121 -0
- package/dist/gasless/batch/calls.d.ts.map +1 -0
- package/dist/gasless/batch/calls.js +36 -0
- package/dist/gasless/batch/calls.js.map +1 -0
- package/dist/gasless/batch/index.d.ts +2 -0
- package/dist/gasless/batch/index.d.ts.map +1 -0
- package/dist/gasless/batch/resolve-gasless-batch.d.ts +118 -0
- package/dist/gasless/batch/resolve-gasless-batch.d.ts.map +1 -0
- package/dist/gasless/batch/resolve-gasless-batch.js +89 -0
- package/dist/gasless/batch/resolve-gasless-batch.js.map +1 -0
- package/dist/gasless/classify-gasless-failure.d.ts +99 -0
- package/dist/gasless/classify-gasless-failure.d.ts.map +1 -0
- package/dist/gasless/classify-gasless-failure.js +60 -0
- package/dist/gasless/classify-gasless-failure.js.map +1 -0
- package/dist/gasless/confirm-gasless-request/confirm-gasless-request.d.ts +121 -0
- package/dist/gasless/confirm-gasless-request/confirm-gasless-request.d.ts.map +1 -0
- package/dist/gasless/confirm-gasless-request/confirm-gasless-request.js +73 -0
- package/dist/gasless/confirm-gasless-request/confirm-gasless-request.js.map +1 -0
- package/dist/gasless/confirm-gasless-request/index.d.ts +2 -0
- package/dist/gasless/confirm-gasless-request/index.d.ts.map +1 -0
- package/dist/gasless/constants.d.ts +24 -0
- package/dist/gasless/constants.d.ts.map +1 -0
- package/dist/gasless/constants.js +6 -0
- package/dist/gasless/constants.js.map +1 -0
- package/dist/gasless/delegation-preflight.d.ts +39 -0
- package/dist/gasless/delegation-preflight.d.ts.map +1 -0
- package/dist/gasless/delegation-preflight.js +33 -0
- package/dist/gasless/delegation-preflight.js.map +1 -0
- package/dist/gasless/dispatch/maybe-relay-as-gasless.d.ts +73 -0
- package/dist/gasless/dispatch/maybe-relay-as-gasless.d.ts.map +1 -0
- package/dist/gasless/dispatch/maybe-relay-as-gasless.js +189 -0
- package/dist/gasless/dispatch/maybe-relay-as-gasless.js.map +1 -0
- package/dist/gasless/eip712.d.ts +79 -0
- package/dist/gasless/eip712.d.ts.map +1 -0
- package/dist/gasless/eip712.js +60 -0
- package/dist/gasless/eip712.js.map +1 -0
- package/dist/gasless/errors.d.ts +132 -0
- package/dist/gasless/errors.d.ts.map +1 -0
- package/dist/gasless/errors.js +110 -0
- package/dist/gasless/errors.js.map +1 -0
- package/dist/gasless/events.d.ts +37 -0
- package/dist/gasless/events.d.ts.map +1 -0
- package/dist/gasless/events.js +34 -0
- package/dist/gasless/events.js.map +1 -0
- package/dist/gasless/fallback.d.ts +58 -0
- package/dist/gasless/fallback.d.ts.map +1 -0
- package/dist/gasless/fallback.js +34 -0
- package/dist/gasless/fallback.js.map +1 -0
- package/dist/gasless/format-gasless-operation.d.ts +37 -0
- package/dist/gasless/format-gasless-operation.d.ts.map +1 -0
- package/dist/gasless/format-gasless-operation.js +33 -0
- package/dist/gasless/format-gasless-operation.js.map +1 -0
- package/dist/gasless/gasless-url.d.ts +82 -0
- package/dist/gasless/gasless-url.d.ts.map +1 -0
- package/dist/gasless/gasless-url.js +70 -0
- package/dist/gasless/gasless-url.js.map +1 -0
- package/dist/gasless/gasless-wallet-execute/calls.d.ts +73 -0
- package/dist/gasless/gasless-wallet-execute/calls.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/calls.js +24 -0
- package/dist/gasless/gasless-wallet-execute/calls.js.map +1 -0
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.d.ts +148 -0
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.js +120 -0
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.js.map +1 -0
- package/dist/gasless/gasless-wallet-execute/index.d.ts +5 -0
- package/dist/gasless/gasless-wallet-execute/index.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/query.d.ts +18 -0
- package/dist/gasless/gasless-wallet-execute/query.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/query.js +12 -0
- package/dist/gasless/gasless-wallet-execute/query.js.map +1 -0
- package/dist/gasless/gasless-wallet-execute/selectors.d.ts +38 -0
- package/dist/gasless/gasless-wallet-execute/selectors.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/selectors.js +15 -0
- package/dist/gasless/gasless-wallet-execute/selectors.js.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.d.ts +72 -0
- package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.js +42 -0
- package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.js.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/index.d.ts +3 -0
- package/dist/gasless/get-gasless-batch-fee-quote/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/query.d.ts +47 -0
- package/dist/gasless/get-gasless-batch-fee-quote/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/query.js +50 -0
- package/dist/gasless/get-gasless-batch-fee-quote/query.js.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.d.ts +80 -0
- package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.d.ts.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.js +61 -0
- package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.js.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/index.d.ts +3 -0
- package/dist/gasless/get-gasless-deposit-policy/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/query.d.ts +51 -0
- package/dist/gasless/get-gasless-deposit-policy/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/query.js +25 -0
- package/dist/gasless/get-gasless-deposit-policy/query.js.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.d.ts +27 -0
- package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.js +22 -0
- package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.js.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.d.ts +61 -0
- package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.js +59 -0
- package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.js.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.d.ts +79 -0
- package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.js +53 -0
- package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.js.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/index.d.ts +4 -0
- package/dist/gasless/get-gasless-fee-quote/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/query.d.ts +41 -0
- package/dist/gasless/get-gasless-fee-quote/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/query.js +31 -0
- package/dist/gasless/get-gasless-fee-quote/query.js.map +1 -0
- package/dist/gasless/get-gasless-request/get-gasless-request.d.ts +51 -0
- package/dist/gasless/get-gasless-request/get-gasless-request.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request/get-gasless-request.js +15 -0
- package/dist/gasless/get-gasless-request/get-gasless-request.js.map +1 -0
- package/dist/gasless/get-gasless-request/index.d.ts +4 -0
- package/dist/gasless/get-gasless-request/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request/query.d.ts +64 -0
- package/dist/gasless/get-gasless-request/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request/query.js +42 -0
- package/dist/gasless/get-gasless-request/query.js.map +1 -0
- package/dist/gasless/get-gasless-request/to-gasless-request.d.ts +26 -0
- package/dist/gasless/get-gasless-request/to-gasless-request.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request/to-gasless-request.js +62 -0
- package/dist/gasless/get-gasless-request/to-gasless-request.js.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.d.ts +40 -0
- package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.js +15 -0
- package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.js.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/index.d.ts +4 -0
- package/dist/gasless/get-gasless-request-transactions/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/query.d.ts +75 -0
- package/dist/gasless/get-gasless-request-transactions/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/query.js +37 -0
- package/dist/gasless/get-gasless-request-transactions/query.js.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.d.ts +21 -0
- package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.js +27 -0
- package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.d.ts +48 -0
- package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.js +20 -0
- package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/index.d.ts +3 -0
- package/dist/gasless/get-gasless-wallet-address/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/query.d.ts +46 -0
- package/dist/gasless/get-gasless-wallet-address/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/query.js +25 -0
- package/dist/gasless/get-gasless-wallet-address/query.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.d.ts +57 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.js +17 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/index.d.ts +3 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/query.d.ts +51 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/query.js +25 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/query.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.d.ts +51 -0
- package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.js +21 -0
- package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/index.d.ts +3 -0
- package/dist/gasless/get-gasless-wallet-nonce/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/query.d.ts +47 -0
- package/dist/gasless/get-gasless-wallet-nonce/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/query.js +25 -0
- package/dist/gasless/get-gasless-wallet-nonce/query.js.map +1 -0
- package/dist/gasless/get-session-key-selectors.d.ts +83 -0
- package/dist/gasless/get-session-key-selectors.d.ts.map +1 -0
- package/dist/gasless/get-session-key-selectors.js +25 -0
- package/dist/gasless/get-session-key-selectors.js.map +1 -0
- package/dist/gasless/http.d.ts +229 -0
- package/dist/gasless/http.d.ts.map +1 -0
- package/dist/gasless/http.js +165 -0
- package/dist/gasless/http.js.map +1 -0
- package/dist/gasless/index.d.ts +34 -0
- package/dist/gasless/index.d.ts.map +1 -0
- package/dist/gasless/is-newer-gasless-request.d.ts +32 -0
- package/dist/gasless/is-newer-gasless-request.d.ts.map +1 -0
- package/dist/gasless/is-newer-gasless-request.js +21 -0
- package/dist/gasless/is-newer-gasless-request.js.map +1 -0
- package/dist/gasless/nonce-lock.d.ts +180 -0
- package/dist/gasless/nonce-lock.d.ts.map +1 -0
- package/dist/gasless/nonce-lock.js +102 -0
- package/dist/gasless/nonce-lock.js.map +1 -0
- package/dist/gasless/observe-gasless-request.d.ts +65 -0
- package/dist/gasless/observe-gasless-request.d.ts.map +1 -0
- package/dist/gasless/observe-gasless-request.js +56 -0
- package/dist/gasless/observe-gasless-request.js.map +1 -0
- package/dist/gasless/query-poll-delay.d.ts +39 -0
- package/dist/gasless/query-poll-delay.d.ts.map +1 -0
- package/dist/gasless/query-poll-delay.js +14 -0
- package/dist/gasless/query-poll-delay.js.map +1 -0
- package/dist/gasless/relay-gasless-batch/index.d.ts +3 -0
- package/dist/gasless/relay-gasless-batch/index.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/query.d.ts +18 -0
- package/dist/gasless/relay-gasless-batch/query.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/query.js +12 -0
- package/dist/gasless/relay-gasless-batch/query.js.map +1 -0
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.d.ts +106 -0
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.js +145 -0
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.js.map +1 -0
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.d.ts +36 -0
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.js +24 -0
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.js.map +1 -0
- package/dist/gasless/relay-grant-delegation/index.d.ts +3 -0
- package/dist/gasless/relay-grant-delegation/index.d.ts.map +1 -0
- package/dist/gasless/relay-grant-delegation/query.d.ts +18 -0
- package/dist/gasless/relay-grant-delegation/query.d.ts.map +1 -0
- package/dist/gasless/relay-grant-delegation/query.js +12 -0
- package/dist/gasless/relay-grant-delegation/query.js.map +1 -0
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.d.ts +69 -0
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.d.ts.map +1 -0
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.js +57 -0
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.js.map +1 -0
- package/dist/gasless/relay-instant-operations/index.d.ts +3 -0
- package/dist/gasless/relay-instant-operations/index.d.ts.map +1 -0
- package/dist/gasless/relay-instant-operations/query.d.ts +18 -0
- package/dist/gasless/relay-instant-operations/query.d.ts.map +1 -0
- package/dist/gasless/relay-instant-operations/query.js +12 -0
- package/dist/gasless/relay-instant-operations/query.js.map +1 -0
- package/dist/gasless/relay-instant-operations/relay-instant-operations.d.ts +127 -0
- package/dist/gasless/relay-instant-operations/relay-instant-operations.d.ts.map +1 -0
- package/dist/gasless/relay-instant-operations/relay-instant-operations.js +42 -0
- package/dist/gasless/relay-instant-operations/relay-instant-operations.js.map +1 -0
- package/dist/gasless/relayable-writes.d.ts +163 -0
- package/dist/gasless/relayable-writes.d.ts.map +1 -0
- package/dist/gasless/relayable-writes.js +113 -0
- package/dist/gasless/relayable-writes.js.map +1 -0
- package/dist/gasless/resolve-gasless.d.ts +52 -0
- package/dist/gasless/resolve-gasless.d.ts.map +1 -0
- package/dist/gasless/resolve-gasless.js +19 -0
- package/dist/gasless/resolve-gasless.js.map +1 -0
- package/dist/gasless/resolve-wallet-identities.d.ts +30 -0
- package/dist/gasless/resolve-wallet-identities.d.ts.map +1 -0
- package/dist/gasless/resolve-wallet-identities.js +21 -0
- package/dist/gasless/resolve-wallet-identities.js.map +1 -0
- package/dist/gasless/resubmit-gasless-request/index.d.ts +3 -0
- package/dist/gasless/resubmit-gasless-request/index.d.ts.map +1 -0
- package/dist/gasless/resubmit-gasless-request/query.d.ts +19 -0
- package/dist/gasless/resubmit-gasless-request/query.d.ts.map +1 -0
- package/dist/gasless/resubmit-gasless-request/query.js +12 -0
- package/dist/gasless/resubmit-gasless-request/query.js.map +1 -0
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.d.ts +50 -0
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.d.ts.map +1 -0
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.js +52 -0
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.js.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/index.d.ts +3 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/index.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/query.d.ts +18 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/query.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/query.js +12 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/query.js.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.d.ts +66 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.js +36 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.js.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/index.d.ts +3 -0
- package/dist/gasless/settle-gasless-deposit-new-account/index.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/query.d.ts +18 -0
- package/dist/gasless/settle-gasless-deposit-new-account/query.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/query.js +12 -0
- package/dist/gasless/settle-gasless-deposit-new-account/query.js.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.d.ts +106 -0
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.js +43 -0
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.js.map +1 -0
- package/dist/gasless/status-read-limiter.d.ts +44 -0
- package/dist/gasless/status-read-limiter.d.ts.map +1 -0
- package/dist/gasless/status-read-limiter.js +28 -0
- package/dist/gasless/status-read-limiter.js.map +1 -0
- package/dist/gasless/to-gasless-deposit-receipt.d.ts +61 -0
- package/dist/gasless/to-gasless-deposit-receipt.d.ts.map +1 -0
- package/dist/gasless/to-gasless-deposit-receipt.js +36 -0
- package/dist/gasless/to-gasless-deposit-receipt.js.map +1 -0
- package/dist/gasless/to-gasless-submit-receipt.d.ts +60 -0
- package/dist/gasless/to-gasless-submit-receipt.d.ts.map +1 -0
- package/dist/gasless/to-gasless-submit-receipt.js +26 -0
- package/dist/gasless/to-gasless-submit-receipt.js.map +1 -0
- package/dist/gasless/transient-read.d.ts +32 -0
- package/dist/gasless/transient-read.d.ts.map +1 -0
- package/dist/gasless/transient-read.js +28 -0
- package/dist/gasless/transient-read.js.map +1 -0
- package/dist/gasless/types/generated/gasless-deposits.d.ts +170 -0
- package/dist/gasless/types/generated/gasless-deposits.d.ts.map +1 -0
- package/dist/gasless/types/generated/gasless-operations.d.ts +260 -0
- package/dist/gasless/types/generated/gasless-operations.d.ts.map +1 -0
- package/dist/gasless/types.d.ts +493 -0
- package/dist/gasless/types.d.ts.map +1 -0
- package/dist/gasless/types.js +33 -0
- package/dist/gasless/types.js.map +1 -0
- package/dist/gasless/unconfirmed-submit.d.ts +132 -0
- package/dist/gasless/unconfirmed-submit.d.ts.map +1 -0
- package/dist/gasless/unconfirmed-submit.js +49 -0
- package/dist/gasless/unconfirmed-submit.js.map +1 -0
- package/dist/gasless/wait-for-gasless-request/index.d.ts +2 -0
- package/dist/gasless/wait-for-gasless-request/index.d.ts.map +1 -0
- package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.d.ts +114 -0
- package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.d.ts.map +1 -0
- package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.js +77 -0
- package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.js.map +1 -0
- package/dist/gasless/wallet-id.d.ts +42 -0
- package/dist/gasless/wallet-id.d.ts.map +1 -0
- package/dist/gasless/wallet-id.js +25 -0
- package/dist/gasless/wallet-id.js.map +1 -0
- package/dist/gasless/wire-parse.d.ts +33 -0
- package/dist/gasless/wire-parse.d.ts.map +1 -0
- package/dist/gasless/wire-parse.js +14 -0
- package/dist/gasless/wire-parse.js.map +1 -0
- package/dist/gasless/wire-types.d.ts +73 -0
- package/dist/gasless/wire-types.d.ts.map +1 -0
- package/dist/gasless/write-request-registry.d.ts +56 -0
- package/dist/gasless/write-request-registry.d.ts.map +1 -0
- package/dist/gasless/write-request-registry.js +22 -0
- package/dist/gasless/write-request-registry.js.map +1 -0
- package/dist/index.d.ts +82 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +568 -497
- package/dist/pools/listing-config/to-listing-config.js +2 -2
- package/dist/pools/listing-config/to-listing-config.js.map +1 -1
- package/dist/pools/market-detail/to-listing-market-detail.d.ts.map +1 -1
- package/dist/pools/market-detail/to-listing-market-detail.js +46 -40
- package/dist/pools/market-detail/to-listing-market-detail.js.map +1 -1
- package/dist/pools/markets/to-listing-market.d.ts.map +1 -1
- package/dist/pools/markets/to-listing-market.js +2 -1
- package/dist/pools/markets/to-listing-market.js.map +1 -1
- package/dist/pools/types/generated/listing-backend.d.ts +163 -16
- package/dist/pools/types/generated/listing-backend.d.ts.map +1 -1
- package/dist/pools/types/generated/listing-backend.js.map +1 -1
- package/dist/pools/types.d.ts +52 -2
- package/dist/pools/types.d.ts.map +1 -1
- package/dist/pools/types.js +6 -4
- package/dist/pools/types.js.map +1 -1
- package/dist/quotes/get-quote-funding/get-quote-funding.d.ts +3 -2
- package/dist/quotes/get-quote-funding/get-quote-funding.d.ts.map +1 -1
- package/dist/quotes/get-quote-funding/get-quote-funding.js.map +1 -1
- package/dist/quotes/get-quote-funding/types.d.ts +4 -2
- package/dist/quotes/get-quote-funding/types.d.ts.map +1 -1
- package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.d.ts +68 -0
- package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.d.ts.map +1 -0
- package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.js +34 -0
- package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.js.map +1 -0
- package/dist/quotes/get-quote-pending-funding/index.d.ts +4 -0
- package/dist/quotes/get-quote-pending-funding/index.d.ts.map +1 -0
- package/dist/quotes/get-quote-pending-funding/query.d.ts +58 -0
- package/dist/quotes/get-quote-pending-funding/query.d.ts.map +1 -0
- package/dist/quotes/get-quote-pending-funding/query.js +27 -0
- package/dist/quotes/get-quote-pending-funding/query.js.map +1 -0
- package/dist/quotes/get-quote-pending-funding/types.d.ts +19 -0
- package/dist/quotes/get-quote-pending-funding/types.d.ts.map +1 -0
- package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts +2 -1
- package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts.map +1 -1
- package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.js.map +1 -1
- package/dist/quotes/grouping/aggregate-group-funding.d.ts +9 -8
- package/dist/quotes/grouping/aggregate-group-funding.d.ts.map +1 -1
- package/dist/quotes/grouping/aggregate-group-funding.js.map +1 -1
- package/dist/quotes/grouping/partition-quotes.d.ts +30 -0
- package/dist/quotes/grouping/partition-quotes.d.ts.map +1 -1
- package/dist/quotes/grouping/partition-quotes.js +9 -6
- package/dist/quotes/grouping/partition-quotes.js.map +1 -1
- package/dist/quotes/index.d.ts +1 -0
- package/dist/quotes/index.d.ts.map +1 -1
- package/dist/quotes/unified-quote.d.ts +6 -6
- package/dist/quotes/unified-quote.js.map +1 -1
- package/dist/shared/errors/redact-url.d.ts +15 -0
- package/dist/shared/errors/redact-url.d.ts.map +1 -0
- package/dist/shared/errors/redact-url.js +9 -0
- package/dist/shared/errors/redact-url.js.map +1 -0
- package/dist/shared/errors/retry-after.d.ts +17 -0
- package/dist/shared/errors/retry-after.d.ts.map +1 -0
- package/dist/shared/errors/retry-after.js +16 -0
- package/dist/shared/errors/retry-after.js.map +1 -0
- package/dist/shared/errors/sanitized-api-error.d.ts +32 -0
- package/dist/shared/errors/sanitized-api-error.d.ts.map +1 -0
- package/dist/shared/errors/sanitized-api-error.js +41 -0
- package/dist/shared/errors/sanitized-api-error.js.map +1 -0
- package/dist/shared/errors/symm-error.d.ts +39 -4
- package/dist/shared/errors/symm-error.d.ts.map +1 -1
- package/dist/shared/errors/symm-error.js +29 -15
- package/dist/shared/errors/symm-error.js.map +1 -1
- package/dist/shared/types/properties.d.ts +53 -5
- package/dist/shared/types/properties.d.ts.map +1 -1
- package/dist/shared/utils/core-units.d.ts +82 -0
- package/dist/shared/utils/core-units.d.ts.map +1 -0
- package/dist/shared/utils/core-units.js +21 -0
- package/dist/shared/utils/core-units.js.map +1 -0
- package/dist/shared/utils/http-header.d.ts +16 -0
- package/dist/shared/utils/http-header.d.ts.map +1 -0
- package/dist/shared/utils/http-header.js +14 -0
- package/dist/shared/utils/http-header.js.map +1 -0
- package/dist/shared/utils/query.js +2 -1
- package/dist/shared/utils/query.js.map +1 -1
- package/dist/solvers/force-close/force-close-auto.d.ts +6 -2
- package/dist/solvers/force-close/force-close-auto.d.ts.map +1 -1
- package/dist/solvers/force-close/force-close-auto.js +2 -1
- package/dist/solvers/force-close/force-close-auto.js.map +1 -1
- package/dist/solvers/force-close/force-close-position.d.ts +9 -3
- package/dist/solvers/force-close/force-close-position.d.ts.map +1 -1
- package/dist/solvers/force-close/force-close-position.js +2 -1
- package/dist/solvers/force-close/force-close-position.js.map +1 -1
- package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js +12 -12
- package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.js +7 -7
- package/dist/symmio-contracts/abi/index.d.ts +2 -0
- package/dist/symmio-contracts/abi/index.d.ts.map +1 -1
- package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.d.ts +2323 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.d.ts.map +1 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.js +2706 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.js.map +1 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.d.ts +137 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.d.ts.map +1 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.js +145 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.js.map +1 -0
- package/dist/symmio-contracts/abi/v0.8.6/index.d.ts +2 -0
- package/dist/symmio-contracts/abi/v0.8.6/index.d.ts.map +1 -1
- package/dist/symmio-contracts/abi/v0.8.6/instant-layer.d.ts +1879 -37
- package/dist/symmio-contracts/abi/v0.8.6/instant-layer.d.ts.map +1 -1
- package/dist/symmio-contracts/abi/v0.8.6/instant-layer.js +2180 -50
- package/dist/symmio-contracts/abi/v0.8.6/instant-layer.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/add-margin.d.ts +2 -2
- package/dist/symmio-contracts/account-layer/actions/add-margin.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/add-margin.js +34 -17
- package/dist/symmio-contracts/account-layer/actions/add-margin.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.d.ts +11 -2
- package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.js +33 -17
- package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/delete-sub-account.d.ts +9 -2
- package/dist/symmio-contracts/account-layer/actions/delete-sub-account.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/delete-sub-account.js +33 -16
- package/dist/symmio-contracts/account-layer/actions/delete-sub-account.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.d.ts +8 -2
- package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.js +34 -17
- package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/deposit-for-account.d.ts +8 -2
- package/dist/symmio-contracts/account-layer/actions/deposit-for-account.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/deposit-for-account.js +34 -17
- package/dist/symmio-contracts/account-layer/actions/deposit-for-account.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.d.ts +7 -2
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.js +34 -17
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-info.d.ts +1 -1
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-info.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.d.ts +9 -3
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/remove-margin.d.ts +2 -2
- package/dist/symmio-contracts/account-layer/actions/remove-margin.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/remove-margin.js +41 -20
- package/dist/symmio-contracts/account-layer/actions/remove-margin.js.map +1 -1
- package/dist/symmio-contracts/account-layer/types.d.ts +3 -1
- package/dist/symmio-contracts/account-layer/types.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/types.js.map +1 -1
- package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.d.ts +60 -0
- package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.js +35 -0
- package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.d.ts +91 -0
- package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.js +19 -0
- package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.d.ts +36 -0
- package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.js +15 -0
- package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.d.ts +79 -0
- package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.js +32 -0
- package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.d.ts +43 -0
- package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.js +14 -0
- package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.d.ts +24 -3
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.d.ts.map +1 -1
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js +48 -22
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js.map +1 -1
- package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.d.ts +62 -0
- package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.js +35 -0
- package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/index.d.ts +12 -0
- package/dist/symmio-contracts/instant-layer/index.d.ts.map +1 -1
- package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.d.ts +22 -0
- package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.js +12 -0
- package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-active-delegations.d.ts +36 -0
- package/dist/symmio-contracts/instant-layer/query/get-active-delegations.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-active-delegations.js +29 -0
- package/dist/symmio-contracts/instant-layer/query/get-active-delegations.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.d.ts +39 -0
- package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.js +27 -0
- package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-is-delegation-active.js +7 -7
- package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.d.ts +42 -0
- package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.js +30 -0
- package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.d.ts +36 -0
- package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.js +21 -0
- package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.d.ts +22 -0
- package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.js +12 -0
- package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.js.map +1 -0
- package/dist/symmio-contracts/symmio/actions/allocate.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/allocate.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/allocate.js +2 -1
- package/dist/symmio-contracts/symmio/actions/allocate.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.d.ts +87 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.js +38 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.js.map +1 -0
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.js +2 -1
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/deallocate.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/deallocate.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/deallocate.js +2 -1
- package/dist/symmio-contracts/symmio/actions/deallocate.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.d.ts +15 -3
- package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.js +34 -17
- package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.js +2 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-quote.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/force-cancel-quote.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-quote.js +2 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-quote.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.d.ts +85 -0
- package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.js +29 -0
- package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.js.map +1 -0
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js +2 -1
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.js +2 -1
- package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.js +2 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.js +2 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.d.ts +9 -7
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.js +24 -22
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw.js +4 -2
- package/dist/symmio-contracts/symmio/actions/withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.d.ts +43 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.js +15 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/index.d.ts +4 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/index.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.d.ts +43 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.js +25 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/types.d.ts +85 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/types.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/index.d.ts +5 -0
- package/dist/symmio-contracts/symmio/index.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/internal/call-as-sub-account.d.ts +2 -1
- package/dist/symmio-contracts/symmio/internal/call-as-sub-account.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/internal/call-as-sub-account.js +46 -17
- package/dist/symmio-contracts/symmio/internal/call-as-sub-account.js.map +1 -1
- package/dist/symmio-contracts/symmio/query/approve-operational-fee.d.ts +18 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee.js +12 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee.js.map +1 -0
- package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.d.ts +35 -0
- package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.js +28 -0
- package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.js.map +1 -0
- package/dist/symmio-contracts/symmio/types.d.ts +6 -6
- package/dist/symmio-contracts/symmio/types.js.map +1 -1
- package/dist/symmio-subgraph/executeSubgraphRequest.d.ts +2 -1
- package/dist/symmio-subgraph/executeSubgraphRequest.d.ts.map +1 -1
- package/dist/symmio-subgraph/executeSubgraphRequest.js +24 -21
- package/dist/symmio-subgraph/executeSubgraphRequest.js.map +1 -1
- package/dist/websocket/gasless/close-code-policy.d.ts +51 -0
- package/dist/websocket/gasless/close-code-policy.d.ts.map +1 -0
- package/dist/websocket/gasless/close-code-policy.js +75 -0
- package/dist/websocket/gasless/close-code-policy.js.map +1 -0
- package/dist/websocket/gasless/gasless-stream-hub.d.ts +61 -0
- package/dist/websocket/gasless/gasless-stream-hub.d.ts.map +1 -0
- package/dist/websocket/gasless/gasless-stream-hub.js +311 -0
- package/dist/websocket/gasless/gasless-stream-hub.js.map +1 -0
- package/dist/websocket/gasless/index.d.ts +7 -0
- package/dist/websocket/gasless/index.d.ts.map +1 -0
- package/dist/websocket/gasless/parse-gasless-stream-message.d.ts +82 -0
- package/dist/websocket/gasless/parse-gasless-stream-message.d.ts.map +1 -0
- package/dist/websocket/gasless/parse-gasless-stream-message.js +136 -0
- package/dist/websocket/gasless/parse-gasless-stream-message.js.map +1 -0
- package/dist/websocket/gasless/resolve-gasless-stream-url.d.ts +58 -0
- package/dist/websocket/gasless/resolve-gasless-stream-url.d.ts.map +1 -0
- package/dist/websocket/gasless/resolve-gasless-stream-url.js +59 -0
- package/dist/websocket/gasless/resolve-gasless-stream-url.js.map +1 -0
- package/dist/websocket/gasless/types.d.ts +48 -0
- package/dist/websocket/gasless/types.d.ts.map +1 -0
- package/dist/websocket/gasless/watch-gasless-request.d.ts +72 -0
- package/dist/websocket/gasless/watch-gasless-request.d.ts.map +1 -0
- package/dist/websocket/gasless/watch-gasless-request.js +35 -0
- package/dist/websocket/gasless/watch-gasless-request.js.map +1 -0
- package/dist/websocket/index.d.ts +1 -0
- package/dist/websocket/index.d.ts.map +1 -1
- package/dist/websocket/socket/create-reconnecting-socket.d.ts +39 -6
- package/dist/websocket/socket/create-reconnecting-socket.d.ts.map +1 -1
- package/dist/websocket/socket/create-reconnecting-socket.js +92 -53
- package/dist/websocket/socket/create-reconnecting-socket.js.map +1 -1
- package/dist/websocket/socket/socket-status.d.ts +7 -2
- package/dist/websocket/socket/socket-status.d.ts.map +1 -1
- package/dist/websocket/socket/socket-status.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/symmio-contracts/account-layer/types.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\n\n/**\n * A single Schnorr signature produced by the Muon network's TSS, mirrored from\n * the on-chain `ISymmio.SchnorrSign` struct field-for-field (same order).\n *\n * @remarks\n * Both `owner` and `nonce` are `address` on-chain (not numbers) — `nonce` is the\n * Muon nonce **address**, not a numeric nonce.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/interfaces/ISymmio.sol}\n */\nexport interface SchnorrSign {\n /** Aggregated Schnorr signature scalar. */\n signature: bigint;\n /** Signer (gateway) address. */\n owner: Address;\n /** Muon nonce address (an `address`, not a numeric nonce). */\n nonce: Address;\n}\n\n/**\n * A Muon uPnL attestation, mirrored from the on-chain `ISymmio.SingleUpnlSig`\n * struct field-for-field (same order) so the object encodes directly as the\n * contract tuple without translation.\n *\n * @remarks\n * This is what {@link removeMargin} requires as its `upnlSig` argument: the\n * contract verifies it to prove the virtual account stays solvent after the\n * deallocation. Fetch a fresh one from the Muon service immediately before\n * submitting — the attestation is timestamped and short-lived. Note there is\n * **no** `price` field (this is the uPnL-only sig, not `SingleUpnlAndPriceSig`).\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/interfaces/ISymmio.sol}\n */\nexport interface SingleUpnlSig {\n /** Muon request id (opaque bytes). */\n reqId: Hex;\n /** Attestation timestamp (seconds). */\n timestamp: bigint;\n /** Signed unrealized PnL of the party, `int256` (may be negative). */\n upnl: bigint;\n /** Muon gateway signature over the request (opaque bytes). */\n gatewaySignature: Hex;\n /** The Schnorr TSS signature pieces. */\n sigs: SchnorrSign;\n}\n\n/**\n * Strategy the AccountLayer uses to create Virtual Accounts (VAs) for trades\n * placed through this subaccount.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum SubAccountIsolationType` in\n * `AccountStorage.sol` (perps-core v0.8.6) exactly, so a `uint8` returned by\n * `getUserSubAccounts` casts directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AccountStorage.sol}\n */\nexport enum SubAccountIsolationType {\n /**\n * One VA per trade. Each position lives in its own VA, fully isolated.\n */\n POSITION = 0,\n /**\n * One VA per market. All trades on the same market share a VA.\n */\n MARKET = 1,\n /**\n * One VA per market + direction. Longs and shorts on the same market are\n * isolated from each other.\n */\n MARKET_DIRECTION = 2,\n /**\n * No automatic VA creation. Trades execute on the SubAccount directly or on\n * manually-created VAs.\n */\n CUSTOM = 3,\n}\n\n/**\n * One subaccount owned by a user EOA on a SYMMIO `AccountLayer` deployment.\n *\n * Field shapes mirror the on-chain `SubAccountDetail` struct exactly so callers\n * comparing against raw viem decodings do not have to translate.\n */\nexport interface SubAccountDetail {\n /**\n * The subaccount's proxy address on-chain.\n */\n accountAddress: Address;\n /**\n * The EOA that created and owns the subaccount.\n */\n owner: Address;\n /**\n * User-defined display name. Editable via the `editAccountName` write.\n */\n name: string;\n /**\n * `false` for a subaccount that has been deleted on-chain.\n */\n isExists: boolean;\n /**\n * `true` when the subaccount routes successive quotes for the same market\n * into the existing active VA instead of creating a fresh VA per `sendQuote`.\n * Toggleable only while no VAs are active on the subaccount.\n */\n singleVAMode: boolean;\n /**\n * Affiliate address attributed to the subaccount, or the zero address.\n */\n affiliate: Address;\n /**\n * The Symmio core (diamond) address this subaccount trades against.\n */\n symmioCore: Address;\n /**\n * Free-form contract metadata blob. May be `0x` (empty) for most accounts.\n */\n metadata: Hex;\n /**\n * Strategy the AccountLayer uses to create VAs for this subaccount's trades.\n */\n isolationType: SubAccountIsolationType;\n}\n\n/**\n * Raw balance fields returned by `balanceInfoOfPartyA(account)` on a SYMMIO\n * core/diamond contract.\n *\n * Values are returned in the collateral token's raw units.\n */\nexport interface AccountBalanceInfo {\n /** Total allocated balance. */\n allocatedBalance: bigint;\n /** Locked CVA margin. */\n lockedCVA: bigint;\n /** Locked LF margin. */\n lockedLF: bigint;\n /** Locked PartyA maintenance margin. */\n lockedPartyAMM: bigint;\n /** Locked PartyB maintenance margin. */\n lockedPartyBMM: bigint;\n /** Pending locked CVA margin. */\n pendingLockedCVA: bigint;\n /** Pending locked LF margin. */\n pendingLockedLF: bigint;\n /** Pending locked PartyA maintenance margin. */\n pendingLockedPartyAMM: bigint;\n /** Pending locked PartyB maintenance margin. */\n pendingLockedPartyBMM: bigint;\n}\n\n/**\n * Input parameters for creating one subaccount via `createSubAccounts`.\n *\n * Field shapes and ordering mirror the on-chain `SubAccountCreationData` struct\n * in `AccountStorage.sol` (perps-core v0.8.6) exactly, so the object encodes\n * directly as the contract tuple without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AccountStorage.sol}\n */\nexport interface SubAccountCreationData {\n /**\n * Display name for the subaccount. Validated on-chain to 1-100 characters.\n */\n name: string;\n /**\n * Free-form metadata blob forwarded to the affiliate's `onAccountCreation`\n * hook. Pass `0x` when unused.\n */\n metadata: Hex;\n /**\n * The Symmio core (diamond) the subaccount trades against. Must be whitelisted\n * on the AccountLayer and registered for `affiliate`.\n */\n symmioCore: Address;\n /**\n * Strategy the AccountLayer uses to create VAs for this subaccount's trades.\n */\n isolationType: SubAccountIsolationType;\n /**\n * Route successive same-market quotes into the existing active VA instead of\n * creating a fresh VA per `sendQuote`. Only valid with `MARKET` or\n * `MARKET_DIRECTION` isolation; the contract reverts otherwise.\n */\n singleVAMode: boolean;\n}\n\n/**\n * Lifecycle state of an affiliate on the `AccountLayer`.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum AffiliateState` in\n * `AffiliateStorage.sol` (perps-core v0.8.6) exactly, so a `uint8` returned by\n * `getAffiliateState` casts directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AffiliateStorage.sol}\n */\nexport enum AffiliateState {\n /** No registration exists for this address. */\n NONE = 0,\n /** A registration request has been submitted and is awaiting approval. */\n PENDING = 1,\n /** The affiliate has been approved and can attribute trades and collect fees. */\n ACTIVE = 2,\n /** The affiliate has been paused by an approver; trading attribution is halted. */\n PAUSED = 3,\n}\n\n/**\n * A single fee recipient within an affiliate registration, mirrored from the\n * on-chain `Stakeholder` struct field-for-field (same order).\n *\n * @remarks\n * `share` is scaled to `1e18`; the sum of every stakeholder's `share` plus the\n * registration's `symmioShare` must equal exactly `1e18` or the contract reverts.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AffiliateStorage.sol}\n */\nexport interface Stakeholder {\n /** Address that receives this stakeholder's cut of affiliate fees. */\n receiver: Address;\n /** This stakeholder's fee share, scaled to `1e18` (e.g. `0.4e18` for 40%). */\n share: bigint;\n}\n\n/**\n * The `AffiliateRegistration` tuple passed to {@link requestToRegisterAffiliate},\n * mirrored from the on-chain struct field-for-field (same order) so the object\n * encodes directly as the contract tuple without translation.\n *\n * @remarks\n * The returned affiliate address is a **new, deterministic** `AccountManager`\n * contract derived from `(msg.sender, name)` — not the caller's EOA. Predict it\n * ahead of time with {@link generateAccountManagerAddress}. Registration only\n * creates a `PENDING` affiliate; an `APPROVER_ROLE` holder must approve it before\n * it becomes `ACTIVE`.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AffiliateStorage.sol}\n */\nexport interface AffiliateRegistration {\n /** Display name for the affiliate. Validated on-chain to 1..maxNameLength characters. */\n name: string;\n /** UI brand color for the affiliate (free-form string, e.g. a hex color). */\n brandColor: string;\n /** The affiliate admin address. Must be non-zero; controls the affiliate after approval. */\n admin: Address;\n /** Fee recipients and their shares. Shares plus `symmioShare` must sum to `1e18`. */\n stakeholders: Stakeholder[];\n /** The Symmio protocol's fee share, scaled to `1e18`. With `stakeholders` shares, sums to `1e18`. */\n symmioShare: bigint;\n /** Free-form metadata blob. Pass `0x` when unused. */\n metadata: Hex;\n /** Legacy `MultiAccount` contracts to migrate into this affiliate. Pass `[]` when none. */\n legacyMultiAccounts: Address[];\n /** Symmio core (diamond) addresses to register the affiliate on. Each must be whitelisted. */\n symmioCores: Address[];\n}\n"],"mappings":";AA2DA,IAAY,IAAL,yBAAA,GAAA;QAIL,EAAA,EAAA,WAAA,KAAA,YAIA,EAAA,EAAA,SAAA,KAAA,UAKA,EAAA,EAAA,mBAAA,KAAA,oBAKA,EAAA,EAAA,SAAA,KAAA;AACF,EAAA,CAAA,CAAA,GA0HY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,OAAA,KAAA,QAEA,EAAA,EAAA,UAAA,KAAA,WAEA,EAAA,EAAA,SAAA,KAAA,UAEA,EAAA,EAAA,SAAA,KAAA;AACF,EAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/symmio-contracts/account-layer/types.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\n\n/**\n * A single Schnorr signature produced by the Muon network's TSS, mirrored from\n * the on-chain `ISymmio.SchnorrSign` struct field-for-field (same order).\n *\n * @remarks\n * Both `owner` and `nonce` are `address` on-chain (not numbers) — `nonce` is the\n * Muon nonce **address**, not a numeric nonce.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/interfaces/ISymmio.sol}\n */\nexport interface SchnorrSign {\n /** Aggregated Schnorr signature scalar. */\n signature: bigint;\n /** Signer (gateway) address. */\n owner: Address;\n /** Muon nonce address (an `address`, not a numeric nonce). */\n nonce: Address;\n}\n\n/**\n * A Muon uPnL attestation, mirrored from the on-chain `ISymmio.SingleUpnlSig`\n * struct field-for-field (same order) so the object encodes directly as the\n * contract tuple without translation.\n *\n * @remarks\n * This is what {@link removeMargin} requires as its `upnlSig` argument: the\n * contract verifies it to prove the virtual account stays solvent after the\n * deallocation. Fetch a fresh one from the Muon service immediately before\n * submitting — the attestation is timestamped and short-lived. Note there is\n * **no** `price` field (this is the uPnL-only sig, not `SingleUpnlAndPriceSig`).\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/interfaces/ISymmio.sol}\n */\nexport interface SingleUpnlSig {\n /** Muon request id (opaque bytes). */\n reqId: Hex;\n /** Attestation timestamp (seconds). */\n timestamp: bigint;\n /** Signed unrealized PnL of the party, `int256` (may be negative). */\n upnl: bigint;\n /** Muon gateway signature over the request (opaque bytes). */\n gatewaySignature: Hex;\n /** The Schnorr TSS signature pieces. */\n sigs: SchnorrSign;\n}\n\n/**\n * Strategy the AccountLayer uses to create Virtual Accounts (VAs) for trades\n * placed through this subaccount.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum SubAccountIsolationType` in\n * `AccountStorage.sol` (perps-core v0.8.6) exactly, so a `uint8` returned by\n * `getUserSubAccounts` casts directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AccountStorage.sol}\n */\nexport enum SubAccountIsolationType {\n /**\n * One VA per trade. Each position lives in its own VA, fully isolated.\n */\n POSITION = 0,\n /**\n * One VA per market. All trades on the same market share a VA.\n */\n MARKET = 1,\n /**\n * One VA per market + direction. Longs and shorts on the same market are\n * isolated from each other.\n */\n MARKET_DIRECTION = 2,\n /**\n * No automatic VA creation. Trades execute on the SubAccount directly or on\n * manually-created VAs.\n */\n CUSTOM = 3,\n}\n\n/**\n * One subaccount owned by a user EOA on a SYMMIO `AccountLayer` deployment.\n *\n * Field shapes mirror the on-chain `SubAccountDetail` struct exactly so callers\n * comparing against raw viem decodings do not have to translate.\n */\nexport interface SubAccountDetail {\n /**\n * The subaccount's proxy address on-chain.\n */\n accountAddress: Address;\n /**\n * The EOA that created and owns the subaccount.\n */\n owner: Address;\n /**\n * User-defined display name. Editable via the `editAccountName` write.\n */\n name: string;\n /**\n * `false` for a subaccount that has been deleted on-chain.\n */\n isExists: boolean;\n /**\n * `true` when the subaccount routes successive quotes for the same market\n * into the existing active VA instead of creating a fresh VA per `sendQuote`.\n * Toggleable only while no VAs are active on the subaccount.\n */\n singleVAMode: boolean;\n /**\n * Affiliate address attributed to the subaccount, or the zero address.\n */\n affiliate: Address;\n /**\n * The Symmio core (diamond) address this subaccount trades against.\n */\n symmioCore: Address;\n /**\n * Free-form contract metadata blob. May be `0x` (empty) for most accounts.\n */\n metadata: Hex;\n /**\n * Strategy the AccountLayer uses to create VAs for this subaccount's trades.\n */\n isolationType: SubAccountIsolationType;\n}\n\n/**\n * Raw balance fields returned by `balanceInfoOfPartyA(account)` on a SYMMIO\n * core/diamond contract.\n *\n * Values are in SYMMIO Core's **18-decimal** units, whatever the collateral\n * token's decimals — convert a token amount with `collateralToCore18` before\n * comparing.\n */\nexport interface AccountBalanceInfo {\n /** Total allocated balance. */\n allocatedBalance: bigint;\n /** Locked CVA margin. */\n lockedCVA: bigint;\n /** Locked LF margin. */\n lockedLF: bigint;\n /** Locked PartyA maintenance margin. */\n lockedPartyAMM: bigint;\n /** Locked PartyB maintenance margin. */\n lockedPartyBMM: bigint;\n /** Pending locked CVA margin. */\n pendingLockedCVA: bigint;\n /** Pending locked LF margin. */\n pendingLockedLF: bigint;\n /** Pending locked PartyA maintenance margin. */\n pendingLockedPartyAMM: bigint;\n /** Pending locked PartyB maintenance margin. */\n pendingLockedPartyBMM: bigint;\n}\n\n/**\n * Input parameters for creating one subaccount via `createSubAccounts`.\n *\n * Field shapes and ordering mirror the on-chain `SubAccountCreationData` struct\n * in `AccountStorage.sol` (perps-core v0.8.6) exactly, so the object encodes\n * directly as the contract tuple without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AccountStorage.sol}\n */\nexport interface SubAccountCreationData {\n /**\n * Display name for the subaccount. Validated on-chain to 1-100 characters.\n */\n name: string;\n /**\n * Free-form metadata blob forwarded to the affiliate's `onAccountCreation`\n * hook. Pass `0x` when unused.\n */\n metadata: Hex;\n /**\n * The Symmio core (diamond) the subaccount trades against. Must be whitelisted\n * on the AccountLayer and registered for `affiliate`.\n */\n symmioCore: Address;\n /**\n * Strategy the AccountLayer uses to create VAs for this subaccount's trades.\n */\n isolationType: SubAccountIsolationType;\n /**\n * Route successive same-market quotes into the existing active VA instead of\n * creating a fresh VA per `sendQuote`. Only valid with `MARKET` or\n * `MARKET_DIRECTION` isolation; the contract reverts otherwise.\n */\n singleVAMode: boolean;\n}\n\n/**\n * Lifecycle state of an affiliate on the `AccountLayer`.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum AffiliateState` in\n * `AffiliateStorage.sol` (perps-core v0.8.6) exactly, so a `uint8` returned by\n * `getAffiliateState` casts directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AffiliateStorage.sol}\n */\nexport enum AffiliateState {\n /** No registration exists for this address. */\n NONE = 0,\n /** A registration request has been submitted and is awaiting approval. */\n PENDING = 1,\n /** The affiliate has been approved and can attribute trades and collect fees. */\n ACTIVE = 2,\n /** The affiliate has been paused by an approver; trading attribution is halted. */\n PAUSED = 3,\n}\n\n/**\n * A single fee recipient within an affiliate registration, mirrored from the\n * on-chain `Stakeholder` struct field-for-field (same order).\n *\n * @remarks\n * `share` is scaled to `1e18`; the sum of every stakeholder's `share` plus the\n * registration's `symmioShare` must equal exactly `1e18` or the contract reverts.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AffiliateStorage.sol}\n */\nexport interface Stakeholder {\n /** Address that receives this stakeholder's cut of affiliate fees. */\n receiver: Address;\n /** This stakeholder's fee share, scaled to `1e18` (e.g. `0.4e18` for 40%). */\n share: bigint;\n}\n\n/**\n * The `AffiliateRegistration` tuple passed to {@link requestToRegisterAffiliate},\n * mirrored from the on-chain struct field-for-field (same order) so the object\n * encodes directly as the contract tuple without translation.\n *\n * @remarks\n * The returned affiliate address is a **new, deterministic** `AccountManager`\n * contract derived from `(msg.sender, name)` — not the caller's EOA. Predict it\n * ahead of time with {@link generateAccountManagerAddress}. Registration only\n * creates a `PENDING` affiliate; an `APPROVER_ROLE` holder must approve it before\n * it becomes `ACTIVE`.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/accountLayer/storages/AffiliateStorage.sol}\n */\nexport interface AffiliateRegistration {\n /** Display name for the affiliate. Validated on-chain to 1..maxNameLength characters. */\n name: string;\n /** UI brand color for the affiliate (free-form string, e.g. a hex color). */\n brandColor: string;\n /** The affiliate admin address. Must be non-zero; controls the affiliate after approval. */\n admin: Address;\n /** Fee recipients and their shares. Shares plus `symmioShare` must sum to `1e18`. */\n stakeholders: Stakeholder[];\n /** The Symmio protocol's fee share, scaled to `1e18`. With `stakeholders` shares, sums to `1e18`. */\n symmioShare: bigint;\n /** Free-form metadata blob. Pass `0x` when unused. */\n metadata: Hex;\n /** Legacy `MultiAccount` contracts to migrate into this affiliate. Pass `[]` when none. */\n legacyMultiAccounts: Address[];\n /** Symmio core (diamond) addresses to register the affiliate on. Each must be whitelisted. */\n symmioCores: Address[];\n}\n"],"mappings":";AA2DA,IAAY,IAAL,yBAAA,GAAA;QAIL,EAAA,EAAA,WAAA,KAAA,YAIA,EAAA,EAAA,SAAA,KAAA,UAKA,EAAA,EAAA,mBAAA,KAAA,oBAKA,EAAA,EAAA,SAAA,KAAA;AACF,EAAA,CAAA,CAAA,GA4HY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,OAAA,KAAA,QAEA,EAAA,EAAA,UAAA,KAAA,WAEA,EAAA,EAAA,SAAA,KAAA,UAEA,EAAA,EAAA,SAAA,KAAA;AACF,EAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Address, Hash, Hex } from 'viem';
|
|
2
|
+
import { Config } from '../../../core/config/index.js';
|
|
3
|
+
import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
4
|
+
import { InstantLayerAccount } from '../types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for {@link finalizeRevokeDelegation}.
|
|
7
|
+
*/
|
|
8
|
+
export type FinalizeRevokeDelegationParameters = Compute<WriteContractParameter & {
|
|
9
|
+
/** Account the delegation was granted under. */
|
|
10
|
+
account: InstantLayerAccount;
|
|
11
|
+
/** Delegated signer whose scheduled revocation is being completed. */
|
|
12
|
+
delegate: Address;
|
|
13
|
+
/** Function selectors (`bytes4[]`) to clear. */
|
|
14
|
+
selectors: readonly Hex[];
|
|
15
|
+
}>;
|
|
16
|
+
/** Return type of {@link finalizeRevokeDelegation}: the submitted transaction hash. */
|
|
17
|
+
export type FinalizeRevokeDelegationReturnType = Hash;
|
|
18
|
+
/**
|
|
19
|
+
* Complete a scheduled Instant Layer revocation, deleting the stored grant.
|
|
20
|
+
*
|
|
21
|
+
* **Permissionless.** Unlike {@link initiateRevokeDelegation}, the contract
|
|
22
|
+
* lets *anyone* call this once the cooldown ETA has passed — so a backend, a
|
|
23
|
+
* keeper, or the user's own wallet can finish a revocation the owner started.
|
|
24
|
+
* It reverts `RevocationCooldownNotOver` while the ETA is still in the future,
|
|
25
|
+
* and silently skips any selector that was never scheduled.
|
|
26
|
+
*
|
|
27
|
+
* **This write cannot be relayed, and deliberately takes no `gasless` option.**
|
|
28
|
+
* `_verifyOperation` routes every operation targeting the InstantLayer itself
|
|
29
|
+
* to `_verifyGrantOperation`, which accepts only `grantDelegation` /
|
|
30
|
+
* `grantDelegations` and reverts `InvalidGrantOperation` for anything else — a
|
|
31
|
+
* relayed revocation would always revert. See {@link initiateRevokeDelegation}.
|
|
32
|
+
*
|
|
33
|
+
* **It is optional.** Enforcement reads `pendingRevocationEta` on every
|
|
34
|
+
* operation, so authority ends on its own at the ETA — this call is the
|
|
35
|
+
* bookkeeping leg, not the moment the key loses access, and skipping it leaves
|
|
36
|
+
* a revoked key just as powerless. Nor is it a prerequisite for re-granting:
|
|
37
|
+
* {@link grantDelegation} deletes the pending ETA for each selector it grants,
|
|
38
|
+
* so a stale schedule cannot silently neuter a fresh grant. Present it as
|
|
39
|
+
* cleanup — never as "the revoke".
|
|
40
|
+
*
|
|
41
|
+
* Dry-runs the call first unless `simulateBeforeWrite` is `false` (per-call,
|
|
42
|
+
* falling back to the config default).
|
|
43
|
+
*
|
|
44
|
+
* @param config - The SDK config (must have a `getWalletClient` resolver).
|
|
45
|
+
* @param parameters - Delegating account, delegate, selectors, optional chain id.
|
|
46
|
+
* @returns The submitted transaction hash. The caller waits on the receipt.
|
|
47
|
+
* @throws {SymmError} when the chain is unsupported or no wallet is available.
|
|
48
|
+
* @throws Viem's write errors (`ContractFunctionExecutionError`, ...).
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const hash = await finalizeRevokeDelegation(config, {
|
|
53
|
+
* account: { addr: subAccount, isPartyB: false },
|
|
54
|
+
* delegate: sessionKeyAddress,
|
|
55
|
+
* selectors,
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function finalizeRevokeDelegation(config: Config, parameters: FinalizeRevokeDelegationParameters): Promise<FinalizeRevokeDelegationReturnType>;
|
|
60
|
+
//# sourceMappingURL=finalize-revoke-delegation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalize-revoke-delegation.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAGxF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,OAAO,CACtD,sBAAsB,GAAG;IACvB,gDAAgD;IAChD,OAAO,EAAE,mBAAmB,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,SAAS,EAAE,SAAS,GAAG,EAAE,CAAC;CAC3B,CACF,CAAC;AAEF,uFAAuF;AACvF,MAAM,MAAM,kCAAkC,GAAG,IAAI,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,kCAAkC,GAC7C,OAAO,CAAC,kCAAkC,CAAC,CAwB7C"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { instantLayerAbi as e } from "../../abi/v0.8.6/instant-layer.js";
|
|
2
|
+
import { shouldSimulateBeforeWrite as t } from "../../../shared/utils/simulate-before-write.js";
|
|
3
|
+
//#region src/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.ts
|
|
4
|
+
async function n(n, r) {
|
|
5
|
+
let { chainId: i, account: a, delegate: o, selectors: s, from: c } = r, { addresses: l } = n.getChainConfig(i), u = await n.getWalletClient({
|
|
6
|
+
chainId: i,
|
|
7
|
+
from: c
|
|
8
|
+
});
|
|
9
|
+
return t(n, r) && await n.getClient({ chainId: i }).simulateContract({
|
|
10
|
+
address: l.instantLayerAddress,
|
|
11
|
+
abi: e,
|
|
12
|
+
functionName: "finalizeRevokeDelegation",
|
|
13
|
+
args: [
|
|
14
|
+
a,
|
|
15
|
+
o,
|
|
16
|
+
s
|
|
17
|
+
],
|
|
18
|
+
account: u.account.address
|
|
19
|
+
}), u.writeContract({
|
|
20
|
+
address: l.instantLayerAddress,
|
|
21
|
+
abi: e,
|
|
22
|
+
functionName: "finalizeRevokeDelegation",
|
|
23
|
+
args: [
|
|
24
|
+
a,
|
|
25
|
+
o,
|
|
26
|
+
s
|
|
27
|
+
],
|
|
28
|
+
account: u.account,
|
|
29
|
+
chain: u.chain
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { n as finalizeRevokeDelegation };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=finalize-revoke-delegation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalize-revoke-delegation.js","names":[],"sources":["../../../../src/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.ts"],"sourcesContent":["import { type Address, type Hash, type Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { shouldSimulateBeforeWrite } from \"../../../shared/utils/simulate-before-write\";\nimport { instantLayerAbi } from \"../../abi/v0.8.6/instant-layer\";\nimport type { InstantLayerAccount } from \"../types\";\n\n/**\n * Parameters for {@link finalizeRevokeDelegation}.\n */\nexport type FinalizeRevokeDelegationParameters = Compute<\n WriteContractParameter & {\n /** Account the delegation was granted under. */\n account: InstantLayerAccount;\n /** Delegated signer whose scheduled revocation is being completed. */\n delegate: Address;\n /** Function selectors (`bytes4[]`) to clear. */\n selectors: readonly Hex[];\n }\n>;\n\n/** Return type of {@link finalizeRevokeDelegation}: the submitted transaction hash. */\nexport type FinalizeRevokeDelegationReturnType = Hash;\n\n/**\n * Complete a scheduled Instant Layer revocation, deleting the stored grant.\n *\n * **Permissionless.** Unlike {@link initiateRevokeDelegation}, the contract\n * lets *anyone* call this once the cooldown ETA has passed — so a backend, a\n * keeper, or the user's own wallet can finish a revocation the owner started.\n * It reverts `RevocationCooldownNotOver` while the ETA is still in the future,\n * and silently skips any selector that was never scheduled.\n *\n * **This write cannot be relayed, and deliberately takes no `gasless` option.**\n * `_verifyOperation` routes every operation targeting the InstantLayer itself\n * to `_verifyGrantOperation`, which accepts only `grantDelegation` /\n * `grantDelegations` and reverts `InvalidGrantOperation` for anything else — a\n * relayed revocation would always revert. See {@link initiateRevokeDelegation}.\n *\n * **It is optional.** Enforcement reads `pendingRevocationEta` on every\n * operation, so authority ends on its own at the ETA — this call is the\n * bookkeeping leg, not the moment the key loses access, and skipping it leaves\n * a revoked key just as powerless. Nor is it a prerequisite for re-granting:\n * {@link grantDelegation} deletes the pending ETA for each selector it grants,\n * so a stale schedule cannot silently neuter a fresh grant. Present it as\n * cleanup — never as \"the revoke\".\n *\n * Dry-runs the call first unless `simulateBeforeWrite` is `false` (per-call,\n * falling back to the config default).\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Delegating account, delegate, selectors, optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * const hash = await finalizeRevokeDelegation(config, {\n * account: { addr: subAccount, isPartyB: false },\n * delegate: sessionKeyAddress,\n * selectors,\n * });\n * ```\n */\nexport async function finalizeRevokeDelegation(\n config: Config,\n parameters: FinalizeRevokeDelegationParameters,\n): Promise<FinalizeRevokeDelegationReturnType> {\n const { chainId, account, delegate, selectors, from } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const walletClient = await config.getWalletClient({ chainId, from });\n\n if (shouldSimulateBeforeWrite(config, parameters)) {\n await config.getClient({ chainId }).simulateContract({\n address: addresses.instantLayerAddress,\n abi: instantLayerAbi,\n functionName: \"finalizeRevokeDelegation\",\n args: [account, delegate, selectors],\n account: walletClient.account.address,\n });\n }\n\n return walletClient.writeContract({\n address: addresses.instantLayerAddress,\n abi: instantLayerAbi,\n functionName: \"finalizeRevokeDelegation\",\n args: [account, delegate, selectors],\n account: walletClient.account,\n chain: walletClient.chain,\n });\n}\n"],"mappings":";;;AAiEA,eAAsB,EACpB,GACA,GAC6C;CAC7C,IAAM,EAAE,YAAS,YAAS,aAAU,cAAW,YAAS,GAElD,EAAE,iBAAc,EAAO,eAAe,CAAO,GAC7C,IAAe,MAAM,EAAO,gBAAgB;EAAE;EAAS;CAAK,CAAC;CAYnE,OAVI,EAA0B,GAAQ,CAAU,KAC9C,MAAM,EAAO,UAAU,EAAE,WAAQ,CAAC,EAAE,iBAAiB;EACnD,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM;GAAC;GAAS;GAAU;EAAS;EACnC,SAAS,EAAa,QAAQ;CAChC,CAAC,GAGI,EAAa,cAAc;EAChC,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM;GAAC;GAAS;GAAU;EAAS;EACnC,SAAS,EAAa;EACtB,OAAO,EAAa;CACtB,CAAC;AACH"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Address, Hex } from 'viem';
|
|
2
|
+
import { Config } from '../../../core/config/index.js';
|
|
3
|
+
import { ChainIdParameter, Compute } from '../../../shared/types/properties.js';
|
|
4
|
+
import { InstantLayerAccount } from '../types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for {@link getActiveDelegations}.
|
|
7
|
+
*/
|
|
8
|
+
export type GetActiveDelegationsParameters = Compute<ChainIdParameter & {
|
|
9
|
+
/** Account whose delegations are inspected. May be a sub-account or a virtual account. */
|
|
10
|
+
delegator: InstantLayerAccount;
|
|
11
|
+
/** Delegated signers to probe. */
|
|
12
|
+
delegates: readonly Address[];
|
|
13
|
+
/**
|
|
14
|
+
* Selectors to probe per delegate: `selectors[i]` is the `bytes4[]` checked
|
|
15
|
+
* for `delegates[i]`, so the two arrays are parallel and must be the same
|
|
16
|
+
* length.
|
|
17
|
+
*/
|
|
18
|
+
selectors: readonly (readonly Hex[])[];
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* One delegation the Instant Layer reports as currently active.
|
|
22
|
+
*
|
|
23
|
+
* Mirrors the contract's `InstantLayer.DelegationInfo` struct.
|
|
24
|
+
*/
|
|
25
|
+
export interface ActiveDelegationInfo {
|
|
26
|
+
/** The canonical account the delegation is enforced under. */
|
|
27
|
+
account: InstantLayerAccount;
|
|
28
|
+
/** Signer holding the delegated authority. */
|
|
29
|
+
delegatedSigner: Address;
|
|
30
|
+
/** Selectors of the probed set that are actually delegated and live. */
|
|
31
|
+
selectors: readonly Hex[];
|
|
32
|
+
/**
|
|
33
|
+
* The **earliest** expiry among {@link ActiveDelegationInfo.selectors}, as a
|
|
34
|
+
* Unix timestamp in seconds — not a single grant-wide expiry.
|
|
35
|
+
*
|
|
36
|
+
* The contract tracks `minExpiry` while collecting the active selectors and
|
|
37
|
+
* returns the soonest (`InstantLayer.getActiveDelegations`). Selectors granted
|
|
38
|
+
* in different transactions therefore expire at different times, and a UI that
|
|
39
|
+
* renders this as "expires at" understates every selector but the
|
|
40
|
+
* shortest-lived one. Read {@link getDelegationExpiry} per selector when the
|
|
41
|
+
* exact per-selector expiry matters.
|
|
42
|
+
*/
|
|
43
|
+
expiryTimestamp: bigint;
|
|
44
|
+
}
|
|
45
|
+
/** Return type of {@link getActiveDelegations}: only the delegations that are live. */
|
|
46
|
+
export type GetActiveDelegationsReturnType = readonly ActiveDelegationInfo[];
|
|
47
|
+
/**
|
|
48
|
+
* Read which of the probed (delegate, selector) pairs are currently active
|
|
49
|
+
* delegations for one delegator, in a single call.
|
|
50
|
+
*
|
|
51
|
+
* **This is the canonicalizing getter — prefer it.** {@link getIsDelegationActive}
|
|
52
|
+
* and {@link getDelegationExpiry} read the raw `delegations` mapping verbatim:
|
|
53
|
+
* they do **not** canonicalize a virtual account to its parent sub-account,
|
|
54
|
+
* while the Instant Layer's own enforcement path does. So a caller holding a
|
|
55
|
+
* virtual account address gets `false` / `0n` from the raw readers even though
|
|
56
|
+
* the delegate really can act through that VA. `getActiveDelegations` resolves
|
|
57
|
+
* the account the way enforcement does, which makes it the only read that
|
|
58
|
+
* answers "may this key act right now?" correctly for every account shape.
|
|
59
|
+
*
|
|
60
|
+
* **It is also a filter, not a mirror.** The returned entries cover only the
|
|
61
|
+
* probed pairs that are live; a delegate you passed that holds nothing (or
|
|
62
|
+
* whose grant expired) is simply absent from the result rather than present
|
|
63
|
+
* with an empty selector list.
|
|
64
|
+
*
|
|
65
|
+
* **Revocation timing.** A delegation stays in this result for the whole
|
|
66
|
+
* revocation cooldown after `initiateRevokeDelegation` — enforcement only
|
|
67
|
+
* stops at `pendingRevocationEta`, and `finalizeRevokeDelegation` clears the
|
|
68
|
+
* stored grant afterwards. The contract's `DelegationInfo` struct carries no
|
|
69
|
+
* pending-ETA field, so a UI that wants to show "revoking, live until …" must
|
|
70
|
+
* read the InstantLayer's `pendingRevocationEta(delegator, delegate, selector)`
|
|
71
|
+
* mapping alongside this call.
|
|
72
|
+
*
|
|
73
|
+
* @param config - The SDK config.
|
|
74
|
+
* @param parameters - Delegator account, parallel delegate and selector lists, optional chain id.
|
|
75
|
+
* @returns The subset of probed delegations that are active, with their expiry timestamps.
|
|
76
|
+
* @throws {SymmError} when the chain is unsupported.
|
|
77
|
+
* @throws Viem read errors.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* // Safe for a virtual account address — this read canonicalizes, the raw mapping readers do not.
|
|
82
|
+
* const active = await getActiveDelegations(config, {
|
|
83
|
+
* delegator: { addr: virtualAccount, isPartyB: false },
|
|
84
|
+
* delegates: [sessionKeyAddress],
|
|
85
|
+
* selectors: [sessionKeySelectors],
|
|
86
|
+
* });
|
|
87
|
+
* const stillDelegated = active.length > 0;
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
export declare function getActiveDelegations(config: Config, parameters: GetActiveDelegationsParameters): Promise<GetActiveDelegationsReturnType>;
|
|
91
|
+
//# sourceMappingURL=get-active-delegations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-active-delegations.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/instant-layer/actions/get-active-delegations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,OAAO,CAClD,gBAAgB,GAAG;IACjB,0FAA0F;IAC1F,SAAS,EAAE,mBAAmB,CAAC;IAC/B,kCAAkC;IAClC,SAAS,EAAE,SAAS,OAAO,EAAE,CAAC;IAC9B;;;;OAIG;IACH,SAAS,EAAE,SAAS,CAAC,SAAS,GAAG,EAAE,CAAC,EAAE,CAAC;CACxC,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,OAAO,EAAE,mBAAmB,CAAC;IAC7B,8CAA8C;IAC9C,eAAe,EAAE,OAAO,CAAC;IACzB,wEAAwE;IACxE,SAAS,EAAE,SAAS,GAAG,EAAE,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,uFAAuF;AACvF,MAAM,MAAM,8BAA8B,GAAG,SAAS,oBAAoB,EAAE,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,8BAA8B,GACzC,OAAO,CAAC,8BAA8B,CAAC,CAYzC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { instantLayerAbi as e } from "../../abi/v0.8.6/instant-layer.js";
|
|
2
|
+
//#region src/symmio-contracts/instant-layer/actions/get-active-delegations.ts
|
|
3
|
+
async function t(t, n) {
|
|
4
|
+
let { chainId: r, delegator: i, delegates: a, selectors: o } = n, { addresses: s } = t.getChainConfig(r);
|
|
5
|
+
return t.getClient({ chainId: r }).readContract({
|
|
6
|
+
address: s.instantLayerAddress,
|
|
7
|
+
abi: e,
|
|
8
|
+
functionName: "getActiveDelegations",
|
|
9
|
+
args: [
|
|
10
|
+
i,
|
|
11
|
+
a,
|
|
12
|
+
o
|
|
13
|
+
]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as getActiveDelegations };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=get-active-delegations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-active-delegations.js","names":[],"sources":["../../../../src/symmio-contracts/instant-layer/actions/get-active-delegations.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { instantLayerAbi } from \"../../abi/v0.8.6/instant-layer\";\nimport type { InstantLayerAccount } from \"../types\";\n\n/**\n * Parameters for {@link getActiveDelegations}.\n */\nexport type GetActiveDelegationsParameters = Compute<\n ChainIdParameter & {\n /** Account whose delegations are inspected. May be a sub-account or a virtual account. */\n delegator: InstantLayerAccount;\n /** Delegated signers to probe. */\n delegates: readonly Address[];\n /**\n * Selectors to probe per delegate: `selectors[i]` is the `bytes4[]` checked\n * for `delegates[i]`, so the two arrays are parallel and must be the same\n * length.\n */\n selectors: readonly (readonly Hex[])[];\n }\n>;\n\n/**\n * One delegation the Instant Layer reports as currently active.\n *\n * Mirrors the contract's `InstantLayer.DelegationInfo` struct.\n */\nexport interface ActiveDelegationInfo {\n /** The canonical account the delegation is enforced under. */\n account: InstantLayerAccount;\n /** Signer holding the delegated authority. */\n delegatedSigner: Address;\n /** Selectors of the probed set that are actually delegated and live. */\n selectors: readonly Hex[];\n /**\n * The **earliest** expiry among {@link ActiveDelegationInfo.selectors}, as a\n * Unix timestamp in seconds — not a single grant-wide expiry.\n *\n * The contract tracks `minExpiry` while collecting the active selectors and\n * returns the soonest (`InstantLayer.getActiveDelegations`). Selectors granted\n * in different transactions therefore expire at different times, and a UI that\n * renders this as \"expires at\" understates every selector but the\n * shortest-lived one. Read {@link getDelegationExpiry} per selector when the\n * exact per-selector expiry matters.\n */\n expiryTimestamp: bigint;\n}\n\n/** Return type of {@link getActiveDelegations}: only the delegations that are live. */\nexport type GetActiveDelegationsReturnType = readonly ActiveDelegationInfo[];\n\n/**\n * Read which of the probed (delegate, selector) pairs are currently active\n * delegations for one delegator, in a single call.\n *\n * **This is the canonicalizing getter — prefer it.** {@link getIsDelegationActive}\n * and {@link getDelegationExpiry} read the raw `delegations` mapping verbatim:\n * they do **not** canonicalize a virtual account to its parent sub-account,\n * while the Instant Layer's own enforcement path does. So a caller holding a\n * virtual account address gets `false` / `0n` from the raw readers even though\n * the delegate really can act through that VA. `getActiveDelegations` resolves\n * the account the way enforcement does, which makes it the only read that\n * answers \"may this key act right now?\" correctly for every account shape.\n *\n * **It is also a filter, not a mirror.** The returned entries cover only the\n * probed pairs that are live; a delegate you passed that holds nothing (or\n * whose grant expired) is simply absent from the result rather than present\n * with an empty selector list.\n *\n * **Revocation timing.** A delegation stays in this result for the whole\n * revocation cooldown after `initiateRevokeDelegation` — enforcement only\n * stops at `pendingRevocationEta`, and `finalizeRevokeDelegation` clears the\n * stored grant afterwards. The contract's `DelegationInfo` struct carries no\n * pending-ETA field, so a UI that wants to show \"revoking, live until …\" must\n * read the InstantLayer's `pendingRevocationEta(delegator, delegate, selector)`\n * mapping alongside this call.\n *\n * @param config - The SDK config.\n * @param parameters - Delegator account, parallel delegate and selector lists, optional chain id.\n * @returns The subset of probed delegations that are active, with their expiry timestamps.\n * @throws {SymmError} when the chain is unsupported.\n * @throws Viem read errors.\n *\n * @example\n * ```ts\n * // Safe for a virtual account address — this read canonicalizes, the raw mapping readers do not.\n * const active = await getActiveDelegations(config, {\n * delegator: { addr: virtualAccount, isPartyB: false },\n * delegates: [sessionKeyAddress],\n * selectors: [sessionKeySelectors],\n * });\n * const stillDelegated = active.length > 0;\n * ```\n */\nexport async function getActiveDelegations(\n config: Config,\n parameters: GetActiveDelegationsParameters,\n): Promise<GetActiveDelegationsReturnType> {\n const { chainId, delegator, delegates, selectors } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.instantLayerAddress,\n abi: instantLayerAbi,\n functionName: \"getActiveDelegations\",\n args: [delegator, delegates, selectors],\n });\n}\n"],"mappings":";;AAgGA,eAAsB,EACpB,GACA,GACyC;CACzC,IAAM,EAAE,YAAS,cAAW,cAAW,iBAAc,GAE/C,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM;GAAC;GAAW;GAAW;EAAS;CACxC,CAAC;AACH"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
import { Config } from '../../../core/config/index.js';
|
|
3
|
+
import { ChainIdParameter, Compute } from '../../../shared/types/properties.js';
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for {@link getInstantLayerNonce}.
|
|
6
|
+
*/
|
|
7
|
+
export type GetInstantLayerNonceParameters = Compute<ChainIdParameter & {
|
|
8
|
+
/** InstantLayer signer account (the sub-account the operation runs under). */
|
|
9
|
+
account: Address;
|
|
10
|
+
}>;
|
|
11
|
+
/** Return type of {@link getInstantLayerNonce}: the account's current replay nonce. */
|
|
12
|
+
export type GetInstantLayerNonceReturnType = bigint;
|
|
13
|
+
/**
|
|
14
|
+
* Read the Instant Layer replay nonce for a signer account.
|
|
15
|
+
*
|
|
16
|
+
* Nonces are **sequential**: an operation must be signed with the *next* nonce
|
|
17
|
+
* (`current + 1`), and a batch must carry strictly consecutive nonces in
|
|
18
|
+
* signed-op order (`current + 1`, `current + 2`, …). Read this immediately
|
|
19
|
+
* before building operations — a stale value produces signatures the relayer's
|
|
20
|
+
* simulation rejects. Two concurrent operations built from the same read will
|
|
21
|
+
* collide; serialize per account.
|
|
22
|
+
*
|
|
23
|
+
* @param config - The SDK config.
|
|
24
|
+
* @param parameters - Signer account, optional chain id.
|
|
25
|
+
* @returns The current on-chain nonce. Sign with `nonce + 1n`.
|
|
26
|
+
* @throws {SymmError} when the chain is unsupported.
|
|
27
|
+
* @throws Viem read errors.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const current = await getInstantLayerNonce(config, { account: subAccount });
|
|
32
|
+
* const operation = buildSignedOperation({ ...fields, nonce: current + 1n });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function getInstantLayerNonce(config: Config, parameters: GetInstantLayerNonceParameters): Promise<GetInstantLayerNonceReturnType>;
|
|
36
|
+
//# sourceMappingURL=get-instant-layer-nonce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-instant-layer-nonce.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAGlF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,OAAO,CAClD,gBAAgB,GAAG;IACjB,8EAA8E;IAC9E,OAAO,EAAE,OAAO,CAAC;CAClB,CACF,CAAC;AAEF,uFAAuF;AACvF,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,8BAA8B,GACzC,OAAO,CAAC,8BAA8B,CAAC,CAYzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { instantLayerAbi as e } from "../../abi/v0.8.6/instant-layer.js";
|
|
2
|
+
//#region src/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.ts
|
|
3
|
+
async function t(t, n) {
|
|
4
|
+
let { chainId: r, account: i } = n, { addresses: a } = t.getChainConfig(r);
|
|
5
|
+
return t.getClient({ chainId: r }).readContract({
|
|
6
|
+
address: a.instantLayerAddress,
|
|
7
|
+
abi: e,
|
|
8
|
+
functionName: "nonces",
|
|
9
|
+
args: [i]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as getInstantLayerNonce };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=get-instant-layer-nonce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-instant-layer-nonce.js","names":[],"sources":["../../../../src/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { instantLayerAbi } from \"../../abi/v0.8.6/instant-layer\";\n\n/**\n * Parameters for {@link getInstantLayerNonce}.\n */\nexport type GetInstantLayerNonceParameters = Compute<\n ChainIdParameter & {\n /** InstantLayer signer account (the sub-account the operation runs under). */\n account: Address;\n }\n>;\n\n/** Return type of {@link getInstantLayerNonce}: the account's current replay nonce. */\nexport type GetInstantLayerNonceReturnType = bigint;\n\n/**\n * Read the Instant Layer replay nonce for a signer account.\n *\n * Nonces are **sequential**: an operation must be signed with the *next* nonce\n * (`current + 1`), and a batch must carry strictly consecutive nonces in\n * signed-op order (`current + 1`, `current + 2`, …). Read this immediately\n * before building operations — a stale value produces signatures the relayer's\n * simulation rejects. Two concurrent operations built from the same read will\n * collide; serialize per account.\n *\n * @param config - The SDK config.\n * @param parameters - Signer account, optional chain id.\n * @returns The current on-chain nonce. Sign with `nonce + 1n`.\n * @throws {SymmError} when the chain is unsupported.\n * @throws Viem read errors.\n *\n * @example\n * ```ts\n * const current = await getInstantLayerNonce(config, { account: subAccount });\n * const operation = buildSignedOperation({ ...fields, nonce: current + 1n });\n * ```\n */\nexport async function getInstantLayerNonce(\n config: Config,\n parameters: GetInstantLayerNonceParameters,\n): Promise<GetInstantLayerNonceReturnType> {\n const { chainId, account } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.instantLayerAddress,\n abi: instantLayerAbi,\n functionName: \"nonces\",\n args: [account],\n });\n}\n"],"mappings":";;AAwCA,eAAsB,EACpB,GACA,GACyC;CACzC,IAAM,EAAE,YAAS,eAAY,GAEvB,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,CAAO;CAChB,CAAC;AACH"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Address, Hex } from 'viem';
|
|
2
|
+
import { Config } from '../../../core/config/index.js';
|
|
3
|
+
import { ChainIdParameter, Compute } from '../../../shared/types/properties.js';
|
|
4
|
+
import { InstantLayerAccount } from '../types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for {@link getPendingRevocationEtas}.
|
|
7
|
+
*/
|
|
8
|
+
export type GetPendingRevocationEtasParameters = Compute<ChainIdParameter & {
|
|
9
|
+
/**
|
|
10
|
+
* Account the delegation is enforced under — pass exactly the account that
|
|
11
|
+
* was handed to {@link initiateRevokeDelegation}.
|
|
12
|
+
*/
|
|
13
|
+
delegator: InstantLayerAccount;
|
|
14
|
+
/** The delegated signer whose pending revocations are read. */
|
|
15
|
+
delegate: Address;
|
|
16
|
+
/**
|
|
17
|
+
* Selectors to probe — the **granted** set, not `getActiveDelegations`'
|
|
18
|
+
* matched selectors. Enforcement stops at the ETA while the schedule
|
|
19
|
+
* survives until someone finalizes, so the matched set empties out exactly
|
|
20
|
+
* when the revocation becomes finalizable.
|
|
21
|
+
*/
|
|
22
|
+
selectors: readonly Hex[];
|
|
23
|
+
/** How many `pendingRevocationEta` reads to bundle per multicall. @default 10 */
|
|
24
|
+
batchSize?: number;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Return type of {@link getPendingRevocationEtas}: scheduled revocations keyed
|
|
28
|
+
* by selector, as Unix timestamps in seconds.
|
|
29
|
+
*
|
|
30
|
+
* A probed selector with no scheduled revocation is **absent** from the map
|
|
31
|
+
* rather than present with `0n`, so `map.size === 0` means "nothing is being
|
|
32
|
+
* revoked". Keys are the selectors exactly as they were passed in, so a caller
|
|
33
|
+
* can look one up with its own array element.
|
|
34
|
+
*/
|
|
35
|
+
export type GetPendingRevocationEtasReturnType = ReadonlyMap<Hex, bigint>;
|
|
36
|
+
/**
|
|
37
|
+
* Read the Instant Layer's scheduled revocation ETA for each of a delegate's
|
|
38
|
+
* selectors — the only on-chain signal that a revocation is in flight.
|
|
39
|
+
*
|
|
40
|
+
* **Nothing else reveals a pending revocation.** {@link initiateRevokeDelegation}
|
|
41
|
+
* does not touch the `delegations` mapping; it only stamps
|
|
42
|
+
* `pendingRevocationEta = block.timestamp + revocationCooldown`. The contract
|
|
43
|
+
* keeps enforcing the delegation until that ETA passes, so
|
|
44
|
+
* {@link getIsDelegationActive} and {@link getActiveDelegations} both keep
|
|
45
|
+
* answering "active" for the whole cooldown — correctly, because the key really
|
|
46
|
+
* can still sign. A UI that wants to show "revoking, live until …" must read
|
|
47
|
+
* this mapping alongside them.
|
|
48
|
+
*
|
|
49
|
+
* **The ETA is per selector, not per grant.** A partial revoke schedules only
|
|
50
|
+
* the selectors it was given, so the result can cover a subset of `selectors`.
|
|
51
|
+
* The reads are bundled into **multicalls of `batchSize`** (default 10) to keep
|
|
52
|
+
* each RPC round-trip small.
|
|
53
|
+
*
|
|
54
|
+
* **This read does not canonicalize.** It keys the mapping on `delegator.addr`
|
|
55
|
+
* verbatim, which is exactly what `initiateRevokeDelegation` and
|
|
56
|
+
* `isDelegationActive` do — so pass the same account you revoked with. That is
|
|
57
|
+
* unlike {@link getActiveDelegations}, which resolves a virtual account to its
|
|
58
|
+
* parent sub-account: a VA address answers here only if the revocation was
|
|
59
|
+
* scheduled against that VA.
|
|
60
|
+
*
|
|
61
|
+
* @param config - The SDK config.
|
|
62
|
+
* @param parameters - Delegator account, delegate, selectors, optional chain id and batch size.
|
|
63
|
+
* @returns The scheduled ETAs, keyed by selector; empty when nothing is being revoked.
|
|
64
|
+
* @throws {SymmError} when the chain is unsupported.
|
|
65
|
+
* @throws Viem's `ContractFunctionExecutionError` / multicall errors for on-chain failures.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const etas = await getPendingRevocationEtas(config, {
|
|
70
|
+
* delegator: { addr: subAccount, isPartyB: false },
|
|
71
|
+
* delegate: sessionKeyAddress,
|
|
72
|
+
* selectors,
|
|
73
|
+
* });
|
|
74
|
+
* const now = BigInt(Math.floor(Date.now() / 1000));
|
|
75
|
+
* const isRevoking = [...etas.values()].some((eta) => eta > now);
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare function getPendingRevocationEtas(config: Config, parameters: GetPendingRevocationEtasParameters): Promise<GetPendingRevocationEtasReturnType>;
|
|
79
|
+
//# sourceMappingURL=get-pending-revocation-etas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-pending-revocation-etas.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKpD;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,OAAO,CACtD,gBAAgB,GAAG;IACjB;;;OAGG;IACH,SAAS,EAAE,mBAAmB,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,SAAS,EAAE,SAAS,GAAG,EAAE,CAAC;IAC1B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,kCAAkC,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,kCAAkC,GAC7C,OAAO,CAAC,kCAAkC,CAAC,CA+B7C"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { instantLayerAbi as e } from "../../abi/v0.8.6/instant-layer.js";
|
|
2
|
+
//#region src/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.ts
|
|
3
|
+
var t = 10;
|
|
4
|
+
async function n(n, r) {
|
|
5
|
+
let { chainId: i, delegator: a, delegate: o, selectors: s, batchSize: c = t } = r, l = /* @__PURE__ */ new Map();
|
|
6
|
+
if (s.length === 0) return l;
|
|
7
|
+
let { addresses: u } = n.getChainConfig(i), d = n.getClient({ chainId: i });
|
|
8
|
+
for (let t = 0; t < s.length; t += c) {
|
|
9
|
+
let n = s.slice(t, t + c), r = await d.multicall({
|
|
10
|
+
allowFailure: !1,
|
|
11
|
+
contracts: n.map((t) => ({
|
|
12
|
+
address: u.instantLayerAddress,
|
|
13
|
+
abi: e,
|
|
14
|
+
functionName: "pendingRevocationEta",
|
|
15
|
+
args: [
|
|
16
|
+
a.addr,
|
|
17
|
+
o,
|
|
18
|
+
t
|
|
19
|
+
]
|
|
20
|
+
}))
|
|
21
|
+
});
|
|
22
|
+
n.forEach((e, t) => {
|
|
23
|
+
let n = r[t];
|
|
24
|
+
n !== void 0 && n !== 0n && l.set(e, n);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return l;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { n as getPendingRevocationEtas };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=get-pending-revocation-etas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-pending-revocation-etas.js","names":[],"sources":["../../../../src/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { instantLayerAbi } from \"../../abi/v0.8.6/instant-layer\";\nimport type { InstantLayerAccount } from \"../types\";\n\n/** Default number of `pendingRevocationEta` reads per multicall batch. */\nconst DEFAULT_BATCH_SIZE = 10;\n\n/**\n * Parameters for {@link getPendingRevocationEtas}.\n */\nexport type GetPendingRevocationEtasParameters = Compute<\n ChainIdParameter & {\n /**\n * Account the delegation is enforced under — pass exactly the account that\n * was handed to {@link initiateRevokeDelegation}.\n */\n delegator: InstantLayerAccount;\n /** The delegated signer whose pending revocations are read. */\n delegate: Address;\n /**\n * Selectors to probe — the **granted** set, not `getActiveDelegations`'\n * matched selectors. Enforcement stops at the ETA while the schedule\n * survives until someone finalizes, so the matched set empties out exactly\n * when the revocation becomes finalizable.\n */\n selectors: readonly Hex[];\n /** How many `pendingRevocationEta` reads to bundle per multicall. @default 10 */\n batchSize?: number;\n }\n>;\n\n/**\n * Return type of {@link getPendingRevocationEtas}: scheduled revocations keyed\n * by selector, as Unix timestamps in seconds.\n *\n * A probed selector with no scheduled revocation is **absent** from the map\n * rather than present with `0n`, so `map.size === 0` means \"nothing is being\n * revoked\". Keys are the selectors exactly as they were passed in, so a caller\n * can look one up with its own array element.\n */\nexport type GetPendingRevocationEtasReturnType = ReadonlyMap<Hex, bigint>;\n\n/**\n * Read the Instant Layer's scheduled revocation ETA for each of a delegate's\n * selectors — the only on-chain signal that a revocation is in flight.\n *\n * **Nothing else reveals a pending revocation.** {@link initiateRevokeDelegation}\n * does not touch the `delegations` mapping; it only stamps\n * `pendingRevocationEta = block.timestamp + revocationCooldown`. The contract\n * keeps enforcing the delegation until that ETA passes, so\n * {@link getIsDelegationActive} and {@link getActiveDelegations} both keep\n * answering \"active\" for the whole cooldown — correctly, because the key really\n * can still sign. A UI that wants to show \"revoking, live until …\" must read\n * this mapping alongside them.\n *\n * **The ETA is per selector, not per grant.** A partial revoke schedules only\n * the selectors it was given, so the result can cover a subset of `selectors`.\n * The reads are bundled into **multicalls of `batchSize`** (default 10) to keep\n * each RPC round-trip small.\n *\n * **This read does not canonicalize.** It keys the mapping on `delegator.addr`\n * verbatim, which is exactly what `initiateRevokeDelegation` and\n * `isDelegationActive` do — so pass the same account you revoked with. That is\n * unlike {@link getActiveDelegations}, which resolves a virtual account to its\n * parent sub-account: a VA address answers here only if the revocation was\n * scheduled against that VA.\n *\n * @param config - The SDK config.\n * @param parameters - Delegator account, delegate, selectors, optional chain id and batch size.\n * @returns The scheduled ETAs, keyed by selector; empty when nothing is being revoked.\n * @throws {SymmError} when the chain is unsupported.\n * @throws Viem's `ContractFunctionExecutionError` / multicall errors for on-chain failures.\n *\n * @example\n * ```ts\n * const etas = await getPendingRevocationEtas(config, {\n * delegator: { addr: subAccount, isPartyB: false },\n * delegate: sessionKeyAddress,\n * selectors,\n * });\n * const now = BigInt(Math.floor(Date.now() / 1000));\n * const isRevoking = [...etas.values()].some((eta) => eta > now);\n * ```\n */\nexport async function getPendingRevocationEtas(\n config: Config,\n parameters: GetPendingRevocationEtasParameters,\n): Promise<GetPendingRevocationEtasReturnType> {\n const { chainId, delegator, delegate, selectors, batchSize = DEFAULT_BATCH_SIZE } = parameters;\n\n const etas = new Map<Hex, bigint>();\n if (selectors.length === 0) return etas;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n for (let start = 0; start < selectors.length; start += batchSize) {\n const batch = selectors.slice(start, start + batchSize);\n const results = await client.multicall({\n allowFailure: false,\n contracts: batch.map(\n (selector) =>\n ({\n address: addresses.instantLayerAddress,\n abi: instantLayerAbi,\n functionName: \"pendingRevocationEta\",\n args: [delegator.addr, delegate, selector],\n }) as const,\n ),\n });\n batch.forEach((selector, index) => {\n const eta = results[index];\n /** The mapping returns `0n` for a selector that was never scheduled. */\n if (eta !== undefined && eta !== 0n) etas.set(selector, eta);\n });\n }\n\n return etas;\n}\n"],"mappings":";;AAOA,IAAM,IAAqB;AA+E3B,eAAsB,EACpB,GACA,GAC6C;CAC7C,IAAM,EAAE,YAAS,cAAW,aAAU,cAAW,eAAY,MAAuB,GAE9E,oBAAO,IAAI,IAAiB;CAClC,IAAI,EAAU,WAAW,GAAG,OAAO;CAEnC,IAAM,EAAE,iBAAc,EAAO,eAAe,CAAO,GAC7C,IAAS,EAAO,UAAU,EAAE,WAAQ,CAAC;CAE3C,KAAK,IAAI,IAAQ,GAAG,IAAQ,EAAU,QAAQ,KAAS,GAAW;EAChE,IAAM,IAAQ,EAAU,MAAM,GAAO,IAAQ,CAAS,GAChD,IAAU,MAAM,EAAO,UAAU;GACrC,cAAc;GACd,WAAW,EAAM,KACd,OACE;IACC,SAAS,EAAU;IACnB,KAAK;IACL,cAAc;IACd,MAAM;KAAC,EAAU;KAAM;KAAU;IAAQ;GAC3C,EACJ;EACF,CAAC;EACD,EAAM,SAAS,GAAU,MAAU;GACjC,IAAM,IAAM,EAAQ;GAEpB,AAAI,MAAQ,KAAA,KAAa,MAAQ,MAAI,EAAK,IAAI,GAAU,CAAG;EAC7D,CAAC;CACH;CAEA,OAAO;AACT"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Config } from '../../../core/config/index.js';
|
|
2
|
+
import { ChainIdParameter, Compute } from '../../../shared/types/properties.js';
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for {@link getRevocationCooldown}.
|
|
5
|
+
*/
|
|
6
|
+
export type GetRevocationCooldownParameters = Compute<ChainIdParameter>;
|
|
7
|
+
/** Return type of {@link getRevocationCooldown}: the cooldown in seconds. */
|
|
8
|
+
export type GetRevocationCooldownReturnType = bigint;
|
|
9
|
+
/**
|
|
10
|
+
* Read the Instant Layer's global delegation revocation cooldown, in seconds.
|
|
11
|
+
*
|
|
12
|
+
* This is the delay the two-step revocation enforces.
|
|
13
|
+
* {@link initiateRevokeDelegation} stamps
|
|
14
|
+
* `pendingRevocationEta = block.timestamp + revocationCooldown`;
|
|
15
|
+
* {@link finalizeRevokeDelegation} reverts until that ETA passes, and only then
|
|
16
|
+
* clears the stored grant.
|
|
17
|
+
*
|
|
18
|
+
* **The value is the size of the residual authority window.** Between the
|
|
19
|
+
* initiate and the ETA the delegation is still enforced — `isDelegationActive`
|
|
20
|
+
* keeps returning `true` and the delegate can keep acting — so a UI must show
|
|
21
|
+
* the revocation as *pending*, never as done, for exactly this long. Read the
|
|
22
|
+
* per-delegation `pendingRevocationEta(delegator, delegate, selector)` mapping
|
|
23
|
+
* on the InstantLayer to know when a specific revocation lands; this value only
|
|
24
|
+
* tells you how long a freshly-initiated one will take.
|
|
25
|
+
*
|
|
26
|
+
* The cooldown is a contract-level parameter, not per account, so it is the
|
|
27
|
+
* same for every delegator on the chain and is safe to cache for a long time.
|
|
28
|
+
*
|
|
29
|
+
* @param config - The SDK config.
|
|
30
|
+
* @param parameters - Optional chain id.
|
|
31
|
+
* @returns The cooldown in seconds.
|
|
32
|
+
* @throws {SymmError} when the chain is unsupported.
|
|
33
|
+
* @throws Viem read errors.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const cooldown = await getRevocationCooldown(config);
|
|
38
|
+
* // The key keeps acting for this long after the revocation is initiated.
|
|
39
|
+
* const hours = Number(cooldown) / 3600;
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function getRevocationCooldown(config: Config, parameters?: GetRevocationCooldownParameters): Promise<GetRevocationCooldownReturnType>;
|
|
43
|
+
//# sourceMappingURL=get-revocation-cooldown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-revocation-cooldown.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/instant-layer/actions/get-revocation-cooldown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAGlF;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAExE,6EAA6E;AAC7E,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,+BAAoC,GAC/C,OAAO,CAAC,+BAA+B,CAAC,CAW1C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { instantLayerAbi as e } from "../../abi/v0.8.6/instant-layer.js";
|
|
2
|
+
//#region src/symmio-contracts/instant-layer/actions/get-revocation-cooldown.ts
|
|
3
|
+
async function t(t, n = {}) {
|
|
4
|
+
let { chainId: r } = n, { addresses: i } = t.getChainConfig(r);
|
|
5
|
+
return t.getClient({ chainId: r }).readContract({
|
|
6
|
+
address: i.instantLayerAddress,
|
|
7
|
+
abi: e,
|
|
8
|
+
functionName: "revocationCooldown"
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as getRevocationCooldown };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=get-revocation-cooldown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-revocation-cooldown.js","names":[],"sources":["../../../../src/symmio-contracts/instant-layer/actions/get-revocation-cooldown.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { instantLayerAbi } from \"../../abi/v0.8.6/instant-layer\";\n\n/**\n * Parameters for {@link getRevocationCooldown}.\n */\nexport type GetRevocationCooldownParameters = Compute<ChainIdParameter>;\n\n/** Return type of {@link getRevocationCooldown}: the cooldown in seconds. */\nexport type GetRevocationCooldownReturnType = bigint;\n\n/**\n * Read the Instant Layer's global delegation revocation cooldown, in seconds.\n *\n * This is the delay the two-step revocation enforces.\n * {@link initiateRevokeDelegation} stamps\n * `pendingRevocationEta = block.timestamp + revocationCooldown`;\n * {@link finalizeRevokeDelegation} reverts until that ETA passes, and only then\n * clears the stored grant.\n *\n * **The value is the size of the residual authority window.** Between the\n * initiate and the ETA the delegation is still enforced — `isDelegationActive`\n * keeps returning `true` and the delegate can keep acting — so a UI must show\n * the revocation as *pending*, never as done, for exactly this long. Read the\n * per-delegation `pendingRevocationEta(delegator, delegate, selector)` mapping\n * on the InstantLayer to know when a specific revocation lands; this value only\n * tells you how long a freshly-initiated one will take.\n *\n * The cooldown is a contract-level parameter, not per account, so it is the\n * same for every delegator on the chain and is safe to cache for a long time.\n *\n * @param config - The SDK config.\n * @param parameters - Optional chain id.\n * @returns The cooldown in seconds.\n * @throws {SymmError} when the chain is unsupported.\n * @throws Viem read errors.\n *\n * @example\n * ```ts\n * const cooldown = await getRevocationCooldown(config);\n * // The key keeps acting for this long after the revocation is initiated.\n * const hours = Number(cooldown) / 3600;\n * ```\n */\nexport async function getRevocationCooldown(\n config: Config,\n parameters: GetRevocationCooldownParameters = {},\n): Promise<GetRevocationCooldownReturnType> {\n const { chainId } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.instantLayerAddress,\n abi: instantLayerAbi,\n functionName: \"revocationCooldown\",\n });\n}\n"],"mappings":";;AA6CA,eAAsB,EACpB,GACA,IAA8C,CAAC,GACL;CAC1C,IAAM,EAAE,eAAY,GAEd,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;CAChB,CAAC;AACH"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Address, Hash, Hex } from 'viem';
|
|
2
2
|
import { Config } from '../../../core/config/index.js';
|
|
3
|
-
import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
3
|
+
import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
4
4
|
import { InstantLayerAccount } from '../types.js';
|
|
5
5
|
/**
|
|
6
6
|
* Parameters for {@link grantDelegation}.
|
|
7
7
|
*/
|
|
8
|
-
export type GrantDelegationParameters = Compute<WriteContractParameter & {
|
|
8
|
+
export type GrantDelegationParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
|
|
9
9
|
/** Account that grants the delegation. The wallet must own this account. */
|
|
10
10
|
account: InstantLayerAccount;
|
|
11
11
|
/** Signer that may call the selected Instant Layer functions. */
|
|
@@ -15,7 +15,13 @@ export type GrantDelegationParameters = Compute<WriteContractParameter & {
|
|
|
15
15
|
/** Expiry timestamp in seconds. */
|
|
16
16
|
expiryTimestamp: bigint;
|
|
17
17
|
}>;
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Return type of {@link grantDelegation}: the submitted transaction hash.
|
|
20
|
+
*
|
|
21
|
+
* A relayed grant returns the relayer's broadcast hash, which behaves exactly
|
|
22
|
+
* like a wallet-submitted one — so a caller's receipt wait and invalidation
|
|
23
|
+
* work the same either way, and the transport never leaks into the type.
|
|
24
|
+
*/
|
|
19
25
|
export type GrantDelegationReturnType = Hash;
|
|
20
26
|
/**
|
|
21
27
|
* Grant Instant Layer delegation access for one delegated signer.
|
|
@@ -26,6 +32,21 @@ export type GrantDelegationReturnType = Hash;
|
|
|
26
32
|
* Dry-runs the call with {@link simulateGrantDelegation} first unless
|
|
27
33
|
* `simulateBeforeWrite` is `false` (per-call, falling back to the config default).
|
|
28
34
|
*
|
|
35
|
+
* Relays through the gasless service when the chain runs in gasless execution
|
|
36
|
+
* mode (or the call passes `gasless: true`), so onboarding a session key costs
|
|
37
|
+
* the owner no native gas — the grant itself is a relayable write. The relayed
|
|
38
|
+
* path signs an InstantLayer operation instead of sending a transaction, so it
|
|
39
|
+
* skips the local dry-run; the relayer simulates its own bundle.
|
|
40
|
+
*
|
|
41
|
+
* A `isPartyB: true` account cannot be relayed — the signed-operation encoder
|
|
42
|
+
* has no PartyB form — so it degrades to the wallet path, or throws when
|
|
43
|
+
* gasless was demanded explicitly.
|
|
44
|
+
*
|
|
45
|
+
* **Granting clears any pending revocation** for each selector it covers: the
|
|
46
|
+
* contract deletes `pendingRevocationEta` alongside writing the new expiry. A
|
|
47
|
+
* schedule left unfinalized therefore cannot silently neuter a fresh grant, and
|
|
48
|
+
* {@link finalizeRevokeDelegation} is never a prerequisite for re-granting.
|
|
49
|
+
*
|
|
29
50
|
* @param config - The SDK config (must have a `getWalletClient` resolver).
|
|
30
51
|
* @param parameters - Delegation account, signer, selectors, expiry, optional chain id.
|
|
31
52
|
* @returns The submitted transaction hash. The caller waits on the receipt.
|