@clossir-tech/ts-sdk 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -33
- package/esm/funcs/accounts-get-accounts-cash-assets.d.ts +20 -0
- package/esm/funcs/accounts-get-accounts-cash-assets.d.ts.map +1 -0
- package/esm/funcs/accounts-get-accounts-cash-assets.js +77 -0
- package/esm/funcs/accounts-get-accounts-cash-assets.js.map +1 -0
- package/esm/funcs/accounts-get-accounts-deposit-addresses.d.ts +20 -0
- package/esm/funcs/accounts-get-accounts-deposit-addresses.d.ts.map +1 -0
- package/esm/funcs/accounts-get-accounts-deposit-addresses.js +94 -0
- package/esm/funcs/accounts-get-accounts-deposit-addresses.js.map +1 -0
- package/esm/funcs/accounts-get-accounts-movable-wallets.d.ts +20 -0
- package/esm/funcs/accounts-get-accounts-movable-wallets.d.ts.map +1 -0
- package/esm/funcs/accounts-get-accounts-movable-wallets.js +94 -0
- package/esm/funcs/accounts-get-accounts-movable-wallets.js.map +1 -0
- package/esm/funcs/approvals-post-approvals-by-approval-id-approve.d.ts +20 -0
- package/esm/funcs/approvals-post-approvals-by-approval-id-approve.d.ts.map +1 -0
- package/esm/funcs/approvals-post-approvals-by-approval-id-approve.js +100 -0
- package/esm/funcs/approvals-post-approvals-by-approval-id-approve.js.map +1 -0
- package/esm/funcs/approvals-post-approvals-by-approval-id-reject.d.ts +20 -0
- package/esm/funcs/approvals-post-approvals-by-approval-id-reject.d.ts.map +1 -0
- package/esm/funcs/approvals-post-approvals-by-approval-id-reject.js +100 -0
- package/esm/funcs/approvals-post-approvals-by-approval-id-reject.js.map +1 -0
- package/esm/funcs/assets-patch-orgs-by-org-id-assets-by-asset-id.d.ts +1 -1
- package/esm/funcs/assets-patch-orgs-by-org-id-assets-by-asset-id.js +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-allocate.js +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-allocate.js.map +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-deploy.js +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-deploy.js.map +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets.d.ts +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets.js +1 -1
- package/esm/funcs/attestations-delete-attestations-by-id.d.ts +1 -1
- package/esm/funcs/attestations-delete-attestations-by-id.js +2 -2
- package/esm/funcs/attestations-delete-attestations-by-id.js.map +1 -1
- package/esm/funcs/attestations-post-attestations.js +1 -1
- package/esm/funcs/attestations-post-attestations.js.map +1 -1
- package/esm/funcs/commands-get-commands-by-command-id.d.ts +1 -1
- package/esm/funcs/commands-get-commands-by-command-id.js +1 -1
- package/esm/funcs/compliance-post-orgs-by-org-id-assets-by-asset-id-compliance-policy.d.ts +1 -1
- package/esm/funcs/compliance-post-orgs-by-org-id-assets-by-asset-id-compliance-policy.js +2 -2
- package/esm/funcs/compliance-post-orgs-by-org-id-assets-by-asset-id-compliance-policy.js.map +1 -1
- package/esm/funcs/distributions-post-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id-activate.js +2 -0
- package/esm/funcs/distributions-post-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id-activate.js.map +1 -1
- package/esm/funcs/distributions-post-orgs-by-org-id-assets-by-asset-id-distributions.js +2 -0
- package/esm/funcs/distributions-post-orgs-by-org-id-assets-by-asset-id-distributions.js.map +1 -1
- package/esm/funcs/fees-post-orgs-by-org-id-assets-by-asset-id-fees-distribute.js +3 -1
- package/esm/funcs/fees-post-orgs-by-org-id-assets-by-asset-id-fees-distribute.js.map +1 -1
- package/esm/funcs/markets-delete-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-orders-by-order-id.js +2 -0
- package/esm/funcs/markets-delete-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-orders-by-order-id.js.map +1 -1
- package/esm/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-deposit-hypercore.js +1 -1
- package/esm/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-deposit-hypercore.js.map +1 -1
- package/esm/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-orders.js +3 -1
- package/esm/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-orders.js.map +1 -1
- package/esm/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets.js +1 -1
- package/esm/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets.js.map +1 -1
- package/esm/funcs/nav-post-orgs-by-org-id-assets-by-asset-id-nav-configure.js +2 -0
- package/esm/funcs/nav-post-orgs-by-org-id-assets-by-asset-id-nav-configure.js.map +1 -1
- package/esm/funcs/nav-post-orgs-by-org-id-assets-by-asset-id-nav-publish.js +2 -0
- package/esm/funcs/nav-post-orgs-by-org-id-assets-by-asset-id-nav-publish.js.map +1 -1
- package/esm/funcs/organizations-get-orgs-by-org-id-server-wallet.js +2 -0
- package/esm/funcs/organizations-get-orgs-by-org-id-server-wallet.js.map +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-issuer-register.js +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-issuer-register.js.map +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.d.ts +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.js +4 -2
- package/esm/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.js.map +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-server-wallet.js +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-server-wallet.js.map +1 -1
- package/esm/funcs/organizations-put-orgs-by-org-id-compliance.d.ts +1 -1
- package/esm/funcs/organizations-put-orgs-by-org-id-compliance.js +2 -4
- package/esm/funcs/organizations-put-orgs-by-org-id-compliance.js.map +1 -1
- package/esm/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-deprecate.js +3 -1
- package/esm/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-deprecate.js.map +1 -1
- package/esm/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-pause.js +3 -1
- package/esm/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-pause.js.map +1 -1
- package/esm/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-settle.js +3 -1
- package/esm/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-settle.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/errors/get-oauth-authorize.d.ts +6 -6
- package/esm/models/errors/get-oauth-authorize.js +3 -3
- package/esm/models/errors/get-oauth-userinfo.d.ts +8 -8
- package/esm/models/errors/get-oauth-userinfo.js +4 -4
- package/esm/models/errors/get-passport-home.d.ts +2 -2
- package/esm/models/errors/get-passport-home.js +1 -1
- package/esm/models/errors/get-passport-sign-in.d.ts +2 -2
- package/esm/models/errors/get-passport-sign-in.js +1 -1
- package/esm/models/errors/index.d.ts +2 -0
- package/esm/models/errors/index.d.ts.map +1 -1
- package/esm/models/errors/index.js +2 -0
- package/esm/models/errors/index.js.map +1 -1
- package/esm/models/errors/o-auth-error-response.d.ts +2 -2
- package/esm/models/errors/o-auth-error-response.js +1 -1
- package/esm/models/errors/post-approvals-by-approval-id-approve.d.ts +41 -0
- package/esm/models/errors/post-approvals-by-approval-id-approve.d.ts.map +1 -0
- package/esm/models/errors/post-approvals-by-approval-id-approve.js +52 -0
- package/esm/models/errors/post-approvals-by-approval-id-approve.js.map +1 -0
- package/esm/models/errors/post-approvals-by-approval-id-reject.d.ts +41 -0
- package/esm/models/errors/post-approvals-by-approval-id-reject.d.ts.map +1 -0
- package/esm/models/errors/post-approvals-by-approval-id-reject.js +53 -0
- package/esm/models/errors/post-approvals-by-approval-id-reject.js.map +1 -0
- package/esm/models/errors/post-eligibility-check.d.ts +2 -2
- package/esm/models/errors/post-eligibility-check.js +1 -1
- package/esm/models/errors/post-oauth-par.d.ts +10 -10
- package/esm/models/errors/post-oauth-par.js +5 -5
- package/esm/models/errors/post-oauth-revoke.d.ts +10 -10
- package/esm/models/errors/post-oauth-revoke.js +5 -5
- package/esm/models/errors/post-oauth-token.d.ts +8 -8
- package/esm/models/errors/post-oauth-token.js +4 -4
- package/esm/models/errors/post-passport-sign-in-decision.d.ts +2 -2
- package/esm/models/errors/post-passport-sign-in-decision.js +1 -1
- package/esm/models/operations/get-accounts-cash-assets.d.ts +44 -0
- package/esm/models/operations/get-accounts-cash-assets.d.ts.map +1 -0
- package/esm/models/operations/get-accounts-cash-assets.js +30 -0
- package/esm/models/operations/get-accounts-cash-assets.js.map +1 -0
- package/esm/models/operations/get-accounts-deposit-addresses.d.ts +146 -0
- package/esm/models/operations/get-accounts-deposit-addresses.d.ts.map +1 -0
- package/esm/models/operations/get-accounts-deposit-addresses.js +117 -0
- package/esm/models/operations/get-accounts-deposit-addresses.js.map +1 -0
- package/esm/models/operations/get-accounts-movable-wallets.d.ts +104 -0
- package/esm/models/operations/get-accounts-movable-wallets.d.ts.map +1 -0
- package/esm/models/operations/get-accounts-movable-wallets.js +75 -0
- package/esm/models/operations/get-accounts-movable-wallets.js.map +1 -0
- package/esm/models/operations/get-commands-by-command-id.d.ts +105 -0
- package/esm/models/operations/get-commands-by-command-id.d.ts.map +1 -1
- package/esm/models/operations/get-commands-by-command-id.js +119 -0
- package/esm/models/operations/get-commands-by-command-id.js.map +1 -1
- package/esm/models/operations/get-login-passport-status.d.ts +3 -3
- package/esm/models/operations/get-login-passport-status.d.ts.map +1 -1
- package/esm/models/operations/get-login-passport-status.js +3 -3
- package/esm/models/operations/get-login-passport-status.js.map +1 -1
- package/esm/models/operations/get-preflight-results-by-result-id.d.ts +25 -0
- package/esm/models/operations/get-preflight-results-by-result-id.d.ts.map +1 -1
- package/esm/models/operations/get-preflight-results-by-result-id.js +11 -0
- package/esm/models/operations/get-preflight-results-by-result-id.js.map +1 -1
- package/esm/models/operations/index.d.ts +5 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +5 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/post-accounts-wallets-sync.d.ts +3 -1
- package/esm/models/operations/post-accounts-wallets-sync.d.ts.map +1 -1
- package/esm/models/operations/post-accounts-wallets-sync.js.map +1 -1
- package/esm/models/operations/post-approvals-by-approval-id-approve.d.ts +53 -0
- package/esm/models/operations/post-approvals-by-approval-id-approve.d.ts.map +1 -0
- package/esm/models/operations/post-approvals-by-approval-id-approve.js +41 -0
- package/esm/models/operations/post-approvals-by-approval-id-approve.js.map +1 -0
- package/esm/models/operations/post-approvals-by-approval-id-reject.d.ts +105 -0
- package/esm/models/operations/post-approvals-by-approval-id-reject.d.ts.map +1 -0
- package/esm/models/operations/post-approvals-by-approval-id-reject.js +71 -0
- package/esm/models/operations/post-approvals-by-approval-id-reject.js.map +1 -0
- package/esm/models/operations/post-attestations.d.ts +1 -1
- package/esm/models/operations/post-eligibility-check.d.ts +4 -4
- package/esm/models/operations/post-eligibility-check.d.ts.map +1 -1
- package/esm/models/operations/post-eligibility-check.js +4 -4
- package/esm/models/operations/post-eligibility-check.js.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-orders.d.ts +1 -1
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.d.ts +9 -5
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.d.ts.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.js +1 -1
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.js.map +1 -1
- package/esm/models/operations/post-preflight-intents.d.ts +25 -0
- package/esm/models/operations/post-preflight-intents.d.ts.map +1 -1
- package/esm/models/operations/post-preflight-intents.js +11 -0
- package/esm/models/operations/post-preflight-intents.js.map +1 -1
- package/esm/sdk/accounts.d.ts +21 -0
- package/esm/sdk/accounts.d.ts.map +1 -1
- package/esm/sdk/accounts.js +30 -0
- package/esm/sdk/accounts.js.map +1 -1
- package/esm/sdk/approvals.d.ts +14 -0
- package/esm/sdk/approvals.d.ts.map +1 -1
- package/esm/sdk/approvals.js +20 -0
- package/esm/sdk/approvals.js.map +1 -1
- package/esm/sdk/assets.d.ts +2 -2
- package/esm/sdk/assets.js +2 -2
- package/esm/sdk/attestations.d.ts +1 -1
- package/esm/sdk/attestations.js +1 -1
- package/esm/sdk/commands.d.ts +1 -1
- package/esm/sdk/commands.js +1 -1
- package/esm/sdk/compliance.d.ts +1 -1
- package/esm/sdk/compliance.js +1 -1
- package/esm/sdk/organizations.d.ts +2 -2
- package/esm/sdk/organizations.js +2 -2
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/accounts-get-accounts-cash-assets.ts +157 -0
- package/src/funcs/accounts-get-accounts-deposit-addresses.ts +193 -0
- package/src/funcs/accounts-get-accounts-movable-wallets.ts +193 -0
- package/src/funcs/approvals-post-approvals-by-approval-id-approve.ts +217 -0
- package/src/funcs/approvals-post-approvals-by-approval-id-reject.ts +217 -0
- package/src/funcs/assets-patch-orgs-by-org-id-assets-by-asset-id.ts +1 -1
- package/src/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-allocate.ts +1 -1
- package/src/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-deploy.ts +1 -1
- package/src/funcs/assets-post-orgs-by-org-id-assets.ts +1 -1
- package/src/funcs/attestations-delete-attestations-by-id.ts +2 -2
- package/src/funcs/attestations-post-attestations.ts +1 -1
- package/src/funcs/commands-get-commands-by-command-id.ts +1 -1
- package/src/funcs/compliance-post-orgs-by-org-id-assets-by-asset-id-compliance-policy.ts +2 -2
- package/src/funcs/distributions-post-orgs-by-org-id-assets-by-asset-id-distributions-by-dist-id-activate.ts +3 -0
- package/src/funcs/distributions-post-orgs-by-org-id-assets-by-asset-id-distributions.ts +3 -0
- package/src/funcs/fees-post-orgs-by-org-id-assets-by-asset-id-fees-distribute.ts +3 -0
- package/src/funcs/markets-delete-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-orders-by-order-id.ts +3 -0
- package/src/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-deposit-hypercore.ts +1 -1
- package/src/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-orders.ts +3 -0
- package/src/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets.ts +1 -1
- package/src/funcs/nav-post-orgs-by-org-id-assets-by-asset-id-nav-configure.ts +3 -0
- package/src/funcs/nav-post-orgs-by-org-id-assets-by-asset-id-nav-publish.ts +3 -0
- package/src/funcs/organizations-get-orgs-by-org-id-server-wallet.ts +3 -0
- package/src/funcs/organizations-post-orgs-by-org-id-issuer-register.ts +1 -1
- package/src/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.ts +4 -1
- package/src/funcs/organizations-post-orgs-by-org-id-server-wallet.ts +1 -1
- package/src/funcs/organizations-put-orgs-by-org-id-compliance.ts +6 -4
- package/src/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-deprecate.ts +3 -0
- package/src/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-pause.ts +3 -0
- package/src/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-settle.ts +3 -0
- package/src/lib/config.ts +2 -2
- package/src/models/errors/get-oauth-authorize.ts +6 -6
- package/src/models/errors/get-oauth-userinfo.ts +8 -8
- package/src/models/errors/get-passport-home.ts +2 -2
- package/src/models/errors/get-passport-sign-in.ts +2 -2
- package/src/models/errors/index.ts +2 -0
- package/src/models/errors/o-auth-error-response.ts +2 -2
- package/src/models/errors/post-approvals-by-approval-id-approve.ts +85 -0
- package/src/models/errors/post-approvals-by-approval-id-reject.ts +85 -0
- package/src/models/errors/post-eligibility-check.ts +2 -2
- package/src/models/errors/post-oauth-par.ts +10 -10
- package/src/models/errors/post-oauth-revoke.ts +10 -10
- package/src/models/errors/post-oauth-token.ts +8 -8
- package/src/models/errors/post-passport-sign-in-decision.ts +2 -2
- package/src/models/operations/get-accounts-cash-assets.ts +89 -0
- package/src/models/operations/get-accounts-deposit-addresses.ts +346 -0
- package/src/models/operations/get-accounts-movable-wallets.ts +240 -0
- package/src/models/operations/get-commands-by-command-id.ts +267 -0
- package/src/models/operations/get-login-passport-status.ts +12 -6
- package/src/models/operations/get-preflight-results-by-result-id.ts +51 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/post-accounts-wallets-sync.ts +3 -1
- package/src/models/operations/post-approvals-by-approval-id-approve.ts +134 -0
- package/src/models/operations/post-approvals-by-approval-id-reject.ts +207 -0
- package/src/models/operations/post-attestations.ts +1 -1
- package/src/models/operations/post-eligibility-check.ts +11 -8
- package/src/models/operations/post-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-orders.ts +1 -1
- package/src/models/operations/post-orgs-by-org-id-members-by-user-id-attest.ts +10 -6
- package/src/models/operations/post-preflight-intents.ts +47 -0
- package/src/sdk/accounts.ts +52 -0
- package/src/sdk/approvals.ts +40 -0
- package/src/sdk/assets.ts +2 -2
- package/src/sdk/attestations.ts +1 -1
- package/src/sdk/commands.ts +1 -1
- package/src/sdk/compliance.ts +1 -1
- package/src/sdk/organizations.ts +2 -2
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export const GetAccountsCashAssetsKind = {
|
|
13
|
+
Cash: "cash",
|
|
14
|
+
} as const;
|
|
15
|
+
export type GetAccountsCashAssetsKind = ClosedEnum<
|
|
16
|
+
typeof GetAccountsCashAssetsKind
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export type GetAccountsCashAssetsAsset = {
|
|
20
|
+
/**
|
|
21
|
+
* Cash asset id. Not a UUID: cash assets have no asset row.
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Token symbol
|
|
26
|
+
*/
|
|
27
|
+
symbol: string;
|
|
28
|
+
/**
|
|
29
|
+
* Token decimals, the same on every chain
|
|
30
|
+
*/
|
|
31
|
+
decimals: number;
|
|
32
|
+
kind: GetAccountsCashAssetsKind;
|
|
33
|
+
/**
|
|
34
|
+
* Token contract address per chain. Keys are LayerZero endpoint ids as decimal strings; values are lowercase 0x addresses.
|
|
35
|
+
*/
|
|
36
|
+
tokens: { [k: string]: string };
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Response
|
|
41
|
+
*/
|
|
42
|
+
export type GetAccountsCashAssetsResponse = {
|
|
43
|
+
assets: Array<GetAccountsCashAssetsAsset>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const GetAccountsCashAssetsKind$inboundSchema: z.ZodMiniEnum<
|
|
48
|
+
typeof GetAccountsCashAssetsKind
|
|
49
|
+
> = z.enum(GetAccountsCashAssetsKind);
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const GetAccountsCashAssetsAsset$inboundSchema: z.ZodMiniType<
|
|
53
|
+
GetAccountsCashAssetsAsset,
|
|
54
|
+
unknown
|
|
55
|
+
> = z.object({
|
|
56
|
+
id: types.string(),
|
|
57
|
+
symbol: types.string(),
|
|
58
|
+
decimals: types.number(),
|
|
59
|
+
kind: GetAccountsCashAssetsKind$inboundSchema,
|
|
60
|
+
tokens: z.record(z.string(), types.string()),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export function getAccountsCashAssetsAssetFromJSON(
|
|
64
|
+
jsonString: string,
|
|
65
|
+
): SafeParseResult<GetAccountsCashAssetsAsset, SDKValidationError> {
|
|
66
|
+
return safeParse(
|
|
67
|
+
jsonString,
|
|
68
|
+
(x) => GetAccountsCashAssetsAsset$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
+
`Failed to parse 'GetAccountsCashAssetsAsset' from JSON`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const GetAccountsCashAssetsResponse$inboundSchema: z.ZodMiniType<
|
|
75
|
+
GetAccountsCashAssetsResponse,
|
|
76
|
+
unknown
|
|
77
|
+
> = z.object({
|
|
78
|
+
assets: z.array(z.lazy(() => GetAccountsCashAssetsAsset$inboundSchema)),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export function getAccountsCashAssetsResponseFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<GetAccountsCashAssetsResponse, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => GetAccountsCashAssetsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'GetAccountsCashAssetsResponse' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type GetAccountsDepositAddressesRequest = {
|
|
14
|
+
assetId: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type Address2 = {
|
|
18
|
+
/**
|
|
19
|
+
* Wallet row id
|
|
20
|
+
*/
|
|
21
|
+
walletId: string;
|
|
22
|
+
/**
|
|
23
|
+
* LayerZero endpoint id, as a decimal string
|
|
24
|
+
*/
|
|
25
|
+
chainEid: string;
|
|
26
|
+
deployed: false;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type FinalityBlocks = string | number;
|
|
30
|
+
|
|
31
|
+
export const NotReceivableReasonOther = {
|
|
32
|
+
Other: "other",
|
|
33
|
+
} as const;
|
|
34
|
+
export type NotReceivableReasonOther = ClosedEnum<
|
|
35
|
+
typeof NotReceivableReasonOther
|
|
36
|
+
>;
|
|
37
|
+
|
|
38
|
+
export const NotReceivableReasonJurisdiction = {
|
|
39
|
+
Jurisdiction: "jurisdiction",
|
|
40
|
+
} as const;
|
|
41
|
+
export type NotReceivableReasonJurisdiction = ClosedEnum<
|
|
42
|
+
typeof NotReceivableReasonJurisdiction
|
|
43
|
+
>;
|
|
44
|
+
|
|
45
|
+
export const NotReceivableReasonLevelTooLow = {
|
|
46
|
+
LevelTooLow: "level-too-low",
|
|
47
|
+
} as const;
|
|
48
|
+
export type NotReceivableReasonLevelTooLow = ClosedEnum<
|
|
49
|
+
typeof NotReceivableReasonLevelTooLow
|
|
50
|
+
>;
|
|
51
|
+
|
|
52
|
+
export const NotReceivableReasonAttestationExpired = {
|
|
53
|
+
AttestationExpired: "attestation-expired",
|
|
54
|
+
} as const;
|
|
55
|
+
export type NotReceivableReasonAttestationExpired = ClosedEnum<
|
|
56
|
+
typeof NotReceivableReasonAttestationExpired
|
|
57
|
+
>;
|
|
58
|
+
|
|
59
|
+
export const NotReceivableReasonNoAttestation = {
|
|
60
|
+
NoAttestation: "no-attestation",
|
|
61
|
+
} as const;
|
|
62
|
+
export type NotReceivableReasonNoAttestation = ClosedEnum<
|
|
63
|
+
typeof NotReceivableReasonNoAttestation
|
|
64
|
+
>;
|
|
65
|
+
|
|
66
|
+
export type NotReceivableReason =
|
|
67
|
+
| NotReceivableReasonNoAttestation
|
|
68
|
+
| NotReceivableReasonAttestationExpired
|
|
69
|
+
| NotReceivableReasonLevelTooLow
|
|
70
|
+
| NotReceivableReasonJurisdiction
|
|
71
|
+
| NotReceivableReasonOther;
|
|
72
|
+
|
|
73
|
+
export type Inbound = {
|
|
74
|
+
/**
|
|
75
|
+
* Transaction hash, lowercase 0x hex
|
|
76
|
+
*/
|
|
77
|
+
txHash: string;
|
|
78
|
+
/**
|
|
79
|
+
* Amount in whole units, as a decimal string
|
|
80
|
+
*/
|
|
81
|
+
amount: string;
|
|
82
|
+
/**
|
|
83
|
+
* The block's timestamp, as an ISO 8601 instant
|
|
84
|
+
*/
|
|
85
|
+
at: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type Address1 = {
|
|
89
|
+
/**
|
|
90
|
+
* Wallet row id
|
|
91
|
+
*/
|
|
92
|
+
walletId: string;
|
|
93
|
+
/**
|
|
94
|
+
* LayerZero endpoint id, as a decimal string
|
|
95
|
+
*/
|
|
96
|
+
chainEid: string;
|
|
97
|
+
deployed: true;
|
|
98
|
+
/**
|
|
99
|
+
* EIP-55 checksummed address
|
|
100
|
+
*/
|
|
101
|
+
address: string;
|
|
102
|
+
/**
|
|
103
|
+
* The level of the wallet's active attestation on this chain, or null when none
|
|
104
|
+
*/
|
|
105
|
+
attestedLevel: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Blocks after which a deposit on this chain is treated as final. Null when no depth is stated for the chain; never a default.
|
|
108
|
+
*/
|
|
109
|
+
finalityBlocks: string | number | null;
|
|
110
|
+
/**
|
|
111
|
+
* Deposits bridged from another chain are queued while this is true. After the token is unpaused they must be replayed; a queued deposit that the token refuses at replay, or that the owner drops, is not delivered. Deposits sent on this chain are not affected. A paused token also cannot send to another chain. `null` means not read or not applicable.
|
|
112
|
+
*/
|
|
113
|
+
inboundBridgePaused: boolean | null;
|
|
114
|
+
/**
|
|
115
|
+
* Whether the chain will accept a transfer of this asset to this wallet. Null when it could not be read: unknown, never true.
|
|
116
|
+
*/
|
|
117
|
+
receivable: boolean | null;
|
|
118
|
+
/**
|
|
119
|
+
* Why not, when receivable is false. Null otherwise.
|
|
120
|
+
*/
|
|
121
|
+
notReceivableReason:
|
|
122
|
+
| NotReceivableReasonNoAttestation
|
|
123
|
+
| NotReceivableReasonAttestationExpired
|
|
124
|
+
| NotReceivableReasonLevelTooLow
|
|
125
|
+
| NotReceivableReasonJurisdiction
|
|
126
|
+
| NotReceivableReasonOther
|
|
127
|
+
| null;
|
|
128
|
+
/**
|
|
129
|
+
* The most recent transfers in, newest first, at most 5
|
|
130
|
+
*/
|
|
131
|
+
inbound: Array<Inbound>;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export type AddressUnion = Address1 | Address2;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Response
|
|
138
|
+
*/
|
|
139
|
+
export type GetAccountsDepositAddressesResponse = {
|
|
140
|
+
/**
|
|
141
|
+
* One row per own wallet per chain of the asset
|
|
142
|
+
*/
|
|
143
|
+
addresses: Array<Address1 | Address2>;
|
|
144
|
+
/**
|
|
145
|
+
* True when the inbound lists may be missing transfers. An empty inbound list beside true is not 'no deposits'.
|
|
146
|
+
*/
|
|
147
|
+
historyStale: boolean;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export type GetAccountsDepositAddressesRequest$Outbound = {
|
|
152
|
+
assetId: string;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const GetAccountsDepositAddressesRequest$outboundSchema: z.ZodMiniType<
|
|
157
|
+
GetAccountsDepositAddressesRequest$Outbound,
|
|
158
|
+
GetAccountsDepositAddressesRequest
|
|
159
|
+
> = z.object({
|
|
160
|
+
assetId: z.string(),
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
export function getAccountsDepositAddressesRequestToJSON(
|
|
164
|
+
getAccountsDepositAddressesRequest: GetAccountsDepositAddressesRequest,
|
|
165
|
+
): string {
|
|
166
|
+
return JSON.stringify(
|
|
167
|
+
GetAccountsDepositAddressesRequest$outboundSchema.parse(
|
|
168
|
+
getAccountsDepositAddressesRequest,
|
|
169
|
+
),
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const Address2$inboundSchema: z.ZodMiniType<Address2, unknown> = z
|
|
175
|
+
.object({
|
|
176
|
+
walletId: types.string(),
|
|
177
|
+
chainEid: types.string(),
|
|
178
|
+
deployed: types.literal(false),
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export function address2FromJSON(
|
|
182
|
+
jsonString: string,
|
|
183
|
+
): SafeParseResult<Address2, SDKValidationError> {
|
|
184
|
+
return safeParse(
|
|
185
|
+
jsonString,
|
|
186
|
+
(x) => Address2$inboundSchema.parse(JSON.parse(x)),
|
|
187
|
+
`Failed to parse 'Address2' from JSON`,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export const FinalityBlocks$inboundSchema: z.ZodMiniType<
|
|
193
|
+
FinalityBlocks,
|
|
194
|
+
unknown
|
|
195
|
+
> = smartUnion([types.string(), types.number()]);
|
|
196
|
+
|
|
197
|
+
export function finalityBlocksFromJSON(
|
|
198
|
+
jsonString: string,
|
|
199
|
+
): SafeParseResult<FinalityBlocks, SDKValidationError> {
|
|
200
|
+
return safeParse(
|
|
201
|
+
jsonString,
|
|
202
|
+
(x) => FinalityBlocks$inboundSchema.parse(JSON.parse(x)),
|
|
203
|
+
`Failed to parse 'FinalityBlocks' from JSON`,
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** @internal */
|
|
208
|
+
export const NotReceivableReasonOther$inboundSchema: z.ZodMiniEnum<
|
|
209
|
+
typeof NotReceivableReasonOther
|
|
210
|
+
> = z.enum(NotReceivableReasonOther);
|
|
211
|
+
|
|
212
|
+
/** @internal */
|
|
213
|
+
export const NotReceivableReasonJurisdiction$inboundSchema: z.ZodMiniEnum<
|
|
214
|
+
typeof NotReceivableReasonJurisdiction
|
|
215
|
+
> = z.enum(NotReceivableReasonJurisdiction);
|
|
216
|
+
|
|
217
|
+
/** @internal */
|
|
218
|
+
export const NotReceivableReasonLevelTooLow$inboundSchema: z.ZodMiniEnum<
|
|
219
|
+
typeof NotReceivableReasonLevelTooLow
|
|
220
|
+
> = z.enum(NotReceivableReasonLevelTooLow);
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export const NotReceivableReasonAttestationExpired$inboundSchema: z.ZodMiniEnum<
|
|
224
|
+
typeof NotReceivableReasonAttestationExpired
|
|
225
|
+
> = z.enum(NotReceivableReasonAttestationExpired);
|
|
226
|
+
|
|
227
|
+
/** @internal */
|
|
228
|
+
export const NotReceivableReasonNoAttestation$inboundSchema: z.ZodMiniEnum<
|
|
229
|
+
typeof NotReceivableReasonNoAttestation
|
|
230
|
+
> = z.enum(NotReceivableReasonNoAttestation);
|
|
231
|
+
|
|
232
|
+
/** @internal */
|
|
233
|
+
export const NotReceivableReason$inboundSchema: z.ZodMiniType<
|
|
234
|
+
NotReceivableReason,
|
|
235
|
+
unknown
|
|
236
|
+
> = smartUnion([
|
|
237
|
+
NotReceivableReasonNoAttestation$inboundSchema,
|
|
238
|
+
NotReceivableReasonAttestationExpired$inboundSchema,
|
|
239
|
+
NotReceivableReasonLevelTooLow$inboundSchema,
|
|
240
|
+
NotReceivableReasonJurisdiction$inboundSchema,
|
|
241
|
+
NotReceivableReasonOther$inboundSchema,
|
|
242
|
+
]);
|
|
243
|
+
|
|
244
|
+
export function notReceivableReasonFromJSON(
|
|
245
|
+
jsonString: string,
|
|
246
|
+
): SafeParseResult<NotReceivableReason, SDKValidationError> {
|
|
247
|
+
return safeParse(
|
|
248
|
+
jsonString,
|
|
249
|
+
(x) => NotReceivableReason$inboundSchema.parse(JSON.parse(x)),
|
|
250
|
+
`Failed to parse 'NotReceivableReason' from JSON`,
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** @internal */
|
|
255
|
+
export const Inbound$inboundSchema: z.ZodMiniType<Inbound, unknown> = z.object({
|
|
256
|
+
txHash: types.string(),
|
|
257
|
+
amount: types.string(),
|
|
258
|
+
at: types.string(),
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
export function inboundFromJSON(
|
|
262
|
+
jsonString: string,
|
|
263
|
+
): SafeParseResult<Inbound, SDKValidationError> {
|
|
264
|
+
return safeParse(
|
|
265
|
+
jsonString,
|
|
266
|
+
(x) => Inbound$inboundSchema.parse(JSON.parse(x)),
|
|
267
|
+
`Failed to parse 'Inbound' from JSON`,
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** @internal */
|
|
272
|
+
export const Address1$inboundSchema: z.ZodMiniType<Address1, unknown> = z
|
|
273
|
+
.object({
|
|
274
|
+
walletId: types.string(),
|
|
275
|
+
chainEid: types.string(),
|
|
276
|
+
deployed: types.literal(true),
|
|
277
|
+
address: types.string(),
|
|
278
|
+
attestedLevel: types.nullable(types.string()),
|
|
279
|
+
finalityBlocks: types.nullable(
|
|
280
|
+
smartUnion([types.string(), types.number()]),
|
|
281
|
+
),
|
|
282
|
+
inboundBridgePaused: types.nullable(types.boolean()),
|
|
283
|
+
receivable: types.nullable(types.boolean()),
|
|
284
|
+
notReceivableReason: types.nullable(
|
|
285
|
+
smartUnion([
|
|
286
|
+
NotReceivableReasonNoAttestation$inboundSchema,
|
|
287
|
+
NotReceivableReasonAttestationExpired$inboundSchema,
|
|
288
|
+
NotReceivableReasonLevelTooLow$inboundSchema,
|
|
289
|
+
NotReceivableReasonJurisdiction$inboundSchema,
|
|
290
|
+
NotReceivableReasonOther$inboundSchema,
|
|
291
|
+
]),
|
|
292
|
+
),
|
|
293
|
+
inbound: z.array(z.lazy(() => Inbound$inboundSchema)),
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
export function address1FromJSON(
|
|
297
|
+
jsonString: string,
|
|
298
|
+
): SafeParseResult<Address1, SDKValidationError> {
|
|
299
|
+
return safeParse(
|
|
300
|
+
jsonString,
|
|
301
|
+
(x) => Address1$inboundSchema.parse(JSON.parse(x)),
|
|
302
|
+
`Failed to parse 'Address1' from JSON`,
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** @internal */
|
|
307
|
+
export const AddressUnion$inboundSchema: z.ZodMiniType<AddressUnion, unknown> =
|
|
308
|
+
smartUnion([
|
|
309
|
+
z.lazy(() => Address1$inboundSchema),
|
|
310
|
+
z.lazy(() => Address2$inboundSchema),
|
|
311
|
+
]);
|
|
312
|
+
|
|
313
|
+
export function addressUnionFromJSON(
|
|
314
|
+
jsonString: string,
|
|
315
|
+
): SafeParseResult<AddressUnion, SDKValidationError> {
|
|
316
|
+
return safeParse(
|
|
317
|
+
jsonString,
|
|
318
|
+
(x) => AddressUnion$inboundSchema.parse(JSON.parse(x)),
|
|
319
|
+
`Failed to parse 'AddressUnion' from JSON`,
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** @internal */
|
|
324
|
+
export const GetAccountsDepositAddressesResponse$inboundSchema: z.ZodMiniType<
|
|
325
|
+
GetAccountsDepositAddressesResponse,
|
|
326
|
+
unknown
|
|
327
|
+
> = z.object({
|
|
328
|
+
addresses: z.array(
|
|
329
|
+
smartUnion([
|
|
330
|
+
z.lazy(() => Address1$inboundSchema),
|
|
331
|
+
z.lazy(() => Address2$inboundSchema),
|
|
332
|
+
]),
|
|
333
|
+
),
|
|
334
|
+
historyStale: types.boolean(),
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
export function getAccountsDepositAddressesResponseFromJSON(
|
|
338
|
+
jsonString: string,
|
|
339
|
+
): SafeParseResult<GetAccountsDepositAddressesResponse, SDKValidationError> {
|
|
340
|
+
return safeParse(
|
|
341
|
+
jsonString,
|
|
342
|
+
(x) =>
|
|
343
|
+
GetAccountsDepositAddressesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
344
|
+
`Failed to parse 'GetAccountsDepositAddressesResponse' from JSON`,
|
|
345
|
+
);
|
|
346
|
+
}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as types from "../../types/primitives.js";
|
|
9
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export type GetAccountsMovableWalletsRequest = {
|
|
13
|
+
assetId: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type Balance2 = {
|
|
17
|
+
/**
|
|
18
|
+
* LayerZero endpoint id, as a decimal string
|
|
19
|
+
*/
|
|
20
|
+
chainEid: string;
|
|
21
|
+
/**
|
|
22
|
+
* The balance could not be read
|
|
23
|
+
*/
|
|
24
|
+
balance: any | null;
|
|
25
|
+
/**
|
|
26
|
+
* Why the balance could not be read
|
|
27
|
+
*/
|
|
28
|
+
reason: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type Balance1 = {
|
|
32
|
+
/**
|
|
33
|
+
* LayerZero endpoint id, as a decimal string
|
|
34
|
+
*/
|
|
35
|
+
chainEid: string;
|
|
36
|
+
/**
|
|
37
|
+
* On-chain balance in whole units, as a decimal string
|
|
38
|
+
*/
|
|
39
|
+
balance: string;
|
|
40
|
+
/**
|
|
41
|
+
* The part of the balance under the asset's compliance lockup. Absent means no lockup, not applicable (cash, organization wallets) or unknown. Display only: the preflight check enforces the lockup.
|
|
42
|
+
*/
|
|
43
|
+
locked?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type BalanceUnion = Balance2 | Balance1;
|
|
47
|
+
|
|
48
|
+
export type GetAccountsMovableWalletsWallet = {
|
|
49
|
+
/**
|
|
50
|
+
* Wallet row id
|
|
51
|
+
*/
|
|
52
|
+
id: string;
|
|
53
|
+
/**
|
|
54
|
+
* Display label
|
|
55
|
+
*/
|
|
56
|
+
label: string;
|
|
57
|
+
/**
|
|
58
|
+
* EIP-55 checksummed address
|
|
59
|
+
*/
|
|
60
|
+
address: string;
|
|
61
|
+
/**
|
|
62
|
+
* One row per chain the asset is on
|
|
63
|
+
*/
|
|
64
|
+
balances: Array<Balance2 | Balance1>;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Wallets returned
|
|
69
|
+
*/
|
|
70
|
+
export type VisibleCount = string | number;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Distinct wallets the asset could be moved from, including organization wallets the caller may not use
|
|
74
|
+
*/
|
|
75
|
+
export type TotalCount = string | number;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Response
|
|
79
|
+
*/
|
|
80
|
+
export type GetAccountsMovableWalletsResponse = {
|
|
81
|
+
wallets: Array<GetAccountsMovableWalletsWallet>;
|
|
82
|
+
/**
|
|
83
|
+
* Wallets returned
|
|
84
|
+
*/
|
|
85
|
+
visibleCount: string | number;
|
|
86
|
+
/**
|
|
87
|
+
* Distinct wallets the asset could be moved from, including organization wallets the caller may not use
|
|
88
|
+
*/
|
|
89
|
+
totalCount: string | number;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export type GetAccountsMovableWalletsRequest$Outbound = {
|
|
94
|
+
assetId: string;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const GetAccountsMovableWalletsRequest$outboundSchema: z.ZodMiniType<
|
|
99
|
+
GetAccountsMovableWalletsRequest$Outbound,
|
|
100
|
+
GetAccountsMovableWalletsRequest
|
|
101
|
+
> = z.object({
|
|
102
|
+
assetId: z.string(),
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export function getAccountsMovableWalletsRequestToJSON(
|
|
106
|
+
getAccountsMovableWalletsRequest: GetAccountsMovableWalletsRequest,
|
|
107
|
+
): string {
|
|
108
|
+
return JSON.stringify(
|
|
109
|
+
GetAccountsMovableWalletsRequest$outboundSchema.parse(
|
|
110
|
+
getAccountsMovableWalletsRequest,
|
|
111
|
+
),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
export const Balance2$inboundSchema: z.ZodMiniType<Balance2, unknown> = z
|
|
117
|
+
.object({
|
|
118
|
+
chainEid: types.string(),
|
|
119
|
+
balance: types.nullable(z.any()),
|
|
120
|
+
reason: types.string(),
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
export function balance2FromJSON(
|
|
124
|
+
jsonString: string,
|
|
125
|
+
): SafeParseResult<Balance2, SDKValidationError> {
|
|
126
|
+
return safeParse(
|
|
127
|
+
jsonString,
|
|
128
|
+
(x) => Balance2$inboundSchema.parse(JSON.parse(x)),
|
|
129
|
+
`Failed to parse 'Balance2' from JSON`,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const Balance1$inboundSchema: z.ZodMiniType<Balance1, unknown> = z
|
|
135
|
+
.object({
|
|
136
|
+
chainEid: types.string(),
|
|
137
|
+
balance: types.string(),
|
|
138
|
+
locked: types.optional(types.string()),
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export function balance1FromJSON(
|
|
142
|
+
jsonString: string,
|
|
143
|
+
): SafeParseResult<Balance1, SDKValidationError> {
|
|
144
|
+
return safeParse(
|
|
145
|
+
jsonString,
|
|
146
|
+
(x) => Balance1$inboundSchema.parse(JSON.parse(x)),
|
|
147
|
+
`Failed to parse 'Balance1' from JSON`,
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export const BalanceUnion$inboundSchema: z.ZodMiniType<BalanceUnion, unknown> =
|
|
153
|
+
smartUnion([
|
|
154
|
+
z.lazy(() => Balance2$inboundSchema),
|
|
155
|
+
z.lazy(() => Balance1$inboundSchema),
|
|
156
|
+
]);
|
|
157
|
+
|
|
158
|
+
export function balanceUnionFromJSON(
|
|
159
|
+
jsonString: string,
|
|
160
|
+
): SafeParseResult<BalanceUnion, SDKValidationError> {
|
|
161
|
+
return safeParse(
|
|
162
|
+
jsonString,
|
|
163
|
+
(x) => BalanceUnion$inboundSchema.parse(JSON.parse(x)),
|
|
164
|
+
`Failed to parse 'BalanceUnion' from JSON`,
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** @internal */
|
|
169
|
+
export const GetAccountsMovableWalletsWallet$inboundSchema: z.ZodMiniType<
|
|
170
|
+
GetAccountsMovableWalletsWallet,
|
|
171
|
+
unknown
|
|
172
|
+
> = z.object({
|
|
173
|
+
id: types.string(),
|
|
174
|
+
label: types.string(),
|
|
175
|
+
address: types.string(),
|
|
176
|
+
balances: z.array(
|
|
177
|
+
smartUnion([
|
|
178
|
+
z.lazy(() => Balance2$inboundSchema),
|
|
179
|
+
z.lazy(() => Balance1$inboundSchema),
|
|
180
|
+
]),
|
|
181
|
+
),
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
export function getAccountsMovableWalletsWalletFromJSON(
|
|
185
|
+
jsonString: string,
|
|
186
|
+
): SafeParseResult<GetAccountsMovableWalletsWallet, SDKValidationError> {
|
|
187
|
+
return safeParse(
|
|
188
|
+
jsonString,
|
|
189
|
+
(x) => GetAccountsMovableWalletsWallet$inboundSchema.parse(JSON.parse(x)),
|
|
190
|
+
`Failed to parse 'GetAccountsMovableWalletsWallet' from JSON`,
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** @internal */
|
|
195
|
+
export const VisibleCount$inboundSchema: z.ZodMiniType<VisibleCount, unknown> =
|
|
196
|
+
smartUnion([types.string(), types.number()]);
|
|
197
|
+
|
|
198
|
+
export function visibleCountFromJSON(
|
|
199
|
+
jsonString: string,
|
|
200
|
+
): SafeParseResult<VisibleCount, SDKValidationError> {
|
|
201
|
+
return safeParse(
|
|
202
|
+
jsonString,
|
|
203
|
+
(x) => VisibleCount$inboundSchema.parse(JSON.parse(x)),
|
|
204
|
+
`Failed to parse 'VisibleCount' from JSON`,
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** @internal */
|
|
209
|
+
export const TotalCount$inboundSchema: z.ZodMiniType<TotalCount, unknown> =
|
|
210
|
+
smartUnion([types.string(), types.number()]);
|
|
211
|
+
|
|
212
|
+
export function totalCountFromJSON(
|
|
213
|
+
jsonString: string,
|
|
214
|
+
): SafeParseResult<TotalCount, SDKValidationError> {
|
|
215
|
+
return safeParse(
|
|
216
|
+
jsonString,
|
|
217
|
+
(x) => TotalCount$inboundSchema.parse(JSON.parse(x)),
|
|
218
|
+
`Failed to parse 'TotalCount' from JSON`,
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export const GetAccountsMovableWalletsResponse$inboundSchema: z.ZodMiniType<
|
|
224
|
+
GetAccountsMovableWalletsResponse,
|
|
225
|
+
unknown
|
|
226
|
+
> = z.object({
|
|
227
|
+
wallets: z.array(z.lazy(() => GetAccountsMovableWalletsWallet$inboundSchema)),
|
|
228
|
+
visibleCount: smartUnion([types.string(), types.number()]),
|
|
229
|
+
totalCount: smartUnion([types.string(), types.number()]),
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
export function getAccountsMovableWalletsResponseFromJSON(
|
|
233
|
+
jsonString: string,
|
|
234
|
+
): SafeParseResult<GetAccountsMovableWalletsResponse, SDKValidationError> {
|
|
235
|
+
return safeParse(
|
|
236
|
+
jsonString,
|
|
237
|
+
(x) => GetAccountsMovableWalletsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
238
|
+
`Failed to parse 'GetAccountsMovableWalletsResponse' from JSON`,
|
|
239
|
+
);
|
|
240
|
+
}
|