@ledgerhq/vault-common 2.1.2 → 2.1.3
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/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +6 -0
- package/lib/{chunk-GAKIXPAF.js → chunk-65DEEXP4.js} +1 -1
- package/lib/chunk-65DEEXP4.js.map +1 -0
- package/lib/createHSMBridge.d.ts +1 -1
- package/lib/{index-Cm_O9VIx.d.ts → index-BpLhb-bQ.d.ts} +11 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -2
- package/lib/recipeManifest.d.ts +1 -1
- package/lib/reviewAPIRequest.d.ts +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.js +2 -2
- package/lib/utils.d.ts +1 -1
- package/package.json +1 -1
- package/lib/chunk-GAKIXPAF.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @ledgerhq/vault-common@2.1.
|
|
2
|
+
> @ledgerhq/vault-common@2.1.3 build /home/runner/work/vault-ts/vault-ts/packages/common
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/createHSMBridge.ts, src/index.ts, src/recipeManifest.ts, src/reviewAPIRequest.ts, src/utils.ts, src/crypto/utils.ts, src/types/index.ts
|
|
@@ -13,35 +13,35 @@
|
|
|
13
13
|
[32mCJS[39m [1mlib/crypto/utils.js [22m[32m335.00 B[39m
|
|
14
14
|
[32mCJS[39m [1mlib/types/index.js [22m[32m329.00 B[39m
|
|
15
15
|
[32mCJS[39m [1mlib/index.js [22m[32m120.29 KB[39m
|
|
16
|
-
[32mCJS[39m [1mlib/recipeManifest.js [22m[32m349.00 B[39m
|
|
17
16
|
[32mCJS[39m [1mlib/chunk-FHIMXJ7N.js [22m[32m3.52 KB[39m
|
|
17
|
+
[32mCJS[39m [1mlib/recipeManifest.js [22m[32m349.00 B[39m
|
|
18
18
|
[32mCJS[39m [1mlib/chunk-ODU2VY2U.js [22m[32m17.66 KB[39m
|
|
19
19
|
[32mCJS[39m [1mlib/reviewAPIRequest.js [22m[32m365.00 B[39m
|
|
20
20
|
[32mCJS[39m [1mlib/chunk-33OZ4G5P.js [22m[32m37.23 KB[39m
|
|
21
21
|
[32mCJS[39m [1mlib/chunk-O535UIIL.js [22m[32m3.39 KB[39m
|
|
22
22
|
[32mCJS[39m [1mlib/utils.js [22m[32m1.20 KB[39m
|
|
23
23
|
[32mCJS[39m [1mlib/chunk-TLTMGY3E.js [22m[32m29.23 KB[39m
|
|
24
|
-
[32mCJS[39m [1mlib/chunk-GAKIXPAF.js [22m[32m396.00 B[39m
|
|
25
|
-
[32mCJS[39m [1mlib/chunk-PZ5AY32C.js [22m[32m314.00 B[39m
|
|
26
24
|
[32mCJS[39m [1mlib/chunk-3L2XDBZ2.js [22m[32m8.65 KB[39m
|
|
27
|
-
[32mCJS[39m [1mlib/
|
|
25
|
+
[32mCJS[39m [1mlib/chunk-65DEEXP4.js [22m[32m396.00 B[39m
|
|
26
|
+
[32mCJS[39m [1mlib/chunk-PZ5AY32C.js [22m[32m314.00 B[39m
|
|
28
27
|
[32mCJS[39m [1mlib/crypto/utils.js.map [22m[32m281.00 B[39m
|
|
29
28
|
[32mCJS[39m [1mlib/types/index.js.map [22m[32m269.00 B[39m
|
|
29
|
+
[32mCJS[39m [1mlib/createHSMBridge.js.map [22m[32m293.00 B[39m
|
|
30
30
|
[32mCJS[39m [1mlib/index.js.map [22m[32m178.14 KB[39m
|
|
31
|
+
[32mCJS[39m [1mlib/chunk-FHIMXJ7N.js.map [22m[32m6.86 KB[39m
|
|
31
32
|
[32mCJS[39m [1mlib/recipeManifest.js.map [22m[32m288.00 B[39m
|
|
32
|
-
[32mCJS[39m [1mlib/chunk-ODU2VY2U.js.map [22m[32m36.38 KB[39m
|
|
33
33
|
[32mCJS[39m [1mlib/reviewAPIRequest.js.map [22m[32m308.00 B[39m
|
|
34
|
-
[32mCJS[39m [1mlib/chunk-FHIMXJ7N.js.map [22m[32m6.86 KB[39m
|
|
35
34
|
[32mCJS[39m [1mlib/chunk-33OZ4G5P.js.map [22m[32m71.09 KB[39m
|
|
35
|
+
[32mCJS[39m [1mlib/chunk-ODU2VY2U.js.map [22m[32m36.38 KB[39m
|
|
36
36
|
[32mCJS[39m [1mlib/chunk-O535UIIL.js.map [22m[32m5.19 KB[39m
|
|
37
37
|
[32mCJS[39m [1mlib/utils.js.map [22m[32m398.00 B[39m
|
|
38
38
|
[32mCJS[39m [1mlib/chunk-TLTMGY3E.js.map [22m[32m54.56 KB[39m
|
|
39
|
-
[32mCJS[39m [1mlib/chunk-GAKIXPAF.js.map [22m[32m52.14 KB[39m
|
|
40
39
|
[32mCJS[39m [1mlib/chunk-3L2XDBZ2.js.map [22m[32m20.30 KB[39m
|
|
40
|
+
[32mCJS[39m [1mlib/chunk-65DEEXP4.js.map [22m[32m52.23 KB[39m
|
|
41
41
|
[32mCJS[39m [1mlib/chunk-PZ5AY32C.js.map [22m[32m479.00 B[39m
|
|
42
|
-
[32mCJS[39m ⚡️ Build success in
|
|
42
|
+
[32mCJS[39m ⚡️ Build success in 928ms
|
|
43
43
|
[34mDTS[39m Build start
|
|
44
|
-
[32mDTS[39m ⚡️ Build success in
|
|
44
|
+
[32mDTS[39m ⚡️ Build success in 11491ms
|
|
45
45
|
[32mDTS[39m [1mlib/createHSMBridge.d.ts [22m[32m952.00 B[39m
|
|
46
46
|
[32mDTS[39m [1mlib/index.d.ts [22m[32m12.93 KB[39m
|
|
47
47
|
[32mDTS[39m [1mlib/reviewAPIRequest.d.ts [22m[32m836.00 B[39m
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
[32mDTS[39m [1mlib/crypto/utils.d.ts [22m[32m428.00 B[39m
|
|
50
50
|
[32mDTS[39m [1mlib/recipeManifest.d.ts [22m[32m704.00 B[39m
|
|
51
51
|
[32mDTS[39m [1mlib/types/index.d.ts [22m[32m5.84 KB[39m
|
|
52
|
-
[32mDTS[39m [1mlib/index-
|
|
52
|
+
[32mDTS[39m [1mlib/index-BpLhb-bQ.d.ts [22m[32m67.90 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-65DEEXP4.js","../src/types/index.ts"],"names":[],"mappings":"AAAA;AC+nCO,IAAM,yBAAA,EAA2B;AAAA,EACtC,cAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAqVO,IAAM,WAAA,EAAa,CAAC,MAAA,EAAQ,QAAA,EAAU,MAAA,EAAQ,QAAQ,CAAA;ADj9C7D;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-65DEEXP4.js","sourcesContent":[null,"import { RecordStore } from \"@ledgerhq/hw-transport-mocker\";\nimport { CryptoCurrency, TokenCurrency } from \"@ledgerhq/types-cryptoassets\";\nimport { Logger } from \"@ledgerhq/vault-utils\";\nimport { BigNumber } from \"bignumber.js\";\nimport { Socket } from \"socket.io-client\";\n\nimport { Device } from \"../device/types\";\nimport {\n DataAccount,\n DataExchange,\n DataGroup,\n DataPolicy,\n DataVaultEntity,\n DataWhitelist,\n} from \"../prepareRequest\";\nimport { RecipeManifestResult } from \"../recipeManifest\";\nimport { CardanoBalances } from \"./cardano\";\nimport { PolkadotAccountData } from \"./polkadot\";\nimport { TronBalances } from \"./tron\";\n\nexport * from \"./cardano\";\n\nexport type UserContext = {\n network: Network;\n getToken: () => string | null;\n run: (interactions: Interaction<any>[], data: any) => Promise<any>;\n get: <T>(url: string, requestOptions?: any) => Promise<T>;\n post: <T>(url: string, payload: any) => Promise<T>;\n approveRequest: (payload: any) => Promise<any>;\n approveRequestWithoutHSM: (payload: any) => Promise<any>;\n rejectRequest: (requestID: number) => Promise<any>;\n connectSocket: () => Promise<typeof Socket>;\n onEvent: (cb: (event: VaultEvent) => void) => void;\n};\n\nexport type RawUser = {\n entityType: \"USER\";\n name: string;\n role: \"admin\" | \"operator\";\n device: number;\n};\n\nexport type RawGroup = {\n entityType: \"GROUP\";\n name: string;\n users: number[];\n description?: string;\n};\n\nexport type RawAccount = {\n entityType: \"ACCOUNT\";\n name: string;\n currency: string;\n derivationMode?: string;\n};\n\nexport type RawWhiteList = {\n entityType: \"WHITELIST\";\n name: string;\n description?: string;\n addresses: string[];\n};\n\nexport type RawEntity = RawUser | RawAccount | RawGroup | RawWhiteList;\n\nexport type EntityType =\n | \"USER\"\n | \"GROUP\"\n | \"ACCOUNT\"\n | \"WHITELIST\"\n | \"TRANSACTION\"\n | \"EXCHANGE\"\n | \"POLICY\"\n | \"VAULT_ENTITY\";\n\nexport type TransportType = \"software\" | \"speculos-web\" | \"nodehid\" | \"nodehid-replayer\";\n\nexport type DevicesPoolOptions = {\n salt?: string;\n gate: string;\n apiGateway?: string;\n overrideSeeds?: string[];\n deviceAPIURL?: string;\n notifierURL?: string;\n readOnlyUser?: string;\n transport?: TransportType;\n recordStore?: RecordStore | null;\n psdModel?: PsdModel;\n\n // see VFE-1010\n deviceAPISessionID?: string;\n};\n\nexport type LamOptions = {\n lamURL?: string;\n lamAPIKey?: string;\n};\n\nexport type CliOptions = {\n networkDelay?: number;\n};\n\nexport type PoolOptions = DevicesPoolOptions & LamOptions & CliOptions;\n\nexport type UserContextRunnable = (context: UserContext) => any;\n\nexport type DeployOptions = {\n // vault-remote URL\n remoteURL?: string;\n // name of the instance, will be used for namespace creation & domain registration\n name: string;\n // who is deploying\n owner: string;\n // default is `main`\n preset?: string;\n // expiration date\n expireOn?: Date;\n // arbitrary helm values to pass\n values?: HelmValues;\n // elapsed minutes before deploy throw an error\n watchTimeoutMinutes?: number;\n // spawn a dedicated HSM simu\n useDedicatedHSMSimu?: boolean;\n // use HTTP polling instead of socket to check instance status\n useHTTPPolling?: boolean;\n};\n\nexport type UpgradeOptions = {\n // vault-remote URL\n remoteURL?: string;\n // name of the instance to target\n name: string;\n // will upgrade to values defined in the preset\n preset?: string;\n // arbitrary helm values to pass\n values?: HelmValues;\n // elapsed minutes before deploy throw an error\n watchTimeoutMinutes?: number;\n};\n\nexport type DestroyOptions = {\n // vault-remote URL\n remoteURL?: string;\n // name of the instance\n name: string;\n // wether we should wait for instance to completely disappear\n wait?: boolean;\n};\n\nexport type HelmValue =\n | string\n | number\n | boolean\n | undefined\n | null\n | Array<HelmValue>\n | HelmValues;\n\nexport interface HelmValues {\n [x: string]: HelmValue;\n}\n\nexport type DevicesPool = {\n getRevaultCompatOptions: () => {\n workspace: string;\n deviceApiUrl: string;\n salt: string;\n };\n workspace: string;\n gate: string;\n apiGateway: string | undefined;\n network: Network;\n psdModel: PsdModel;\n login: (deviceIndex: number | string) => Promise<UserContext>;\n getUserID: (deviceIndex: number) => Promise<string>;\n bruteforceDeviceIndex: (userID: string) => Promise<number>;\n setSalt: (salt: string) => void;\n registerDevice: (deviceIndex: number, request: any) => Promise<any>;\n lamAPI: {\n createInvitation: (invitationID: string) => Promise<{ device_id: string }>;\n registerUser: (name: string, uuid: string) => Promise<void>;\n };\n runWithDevice: (deviceIndex: number, interactions: Interaction<any>[], data: any) => Promise<any>;\n runWithQuorum: (iteratee: UserContextRunnable) => Promise<any>;\n device: Device;\n interactions: Interactions;\n getOnboardingAdminDevices: () => Promise<AdminDevice[]>;\n};\n\nexport type ConnectionEdge<T> = {\n cursor: number;\n node: T;\n};\n\nexport type Connection<T> = {\n edges: ConnectionEdge<T>[];\n pageInfo: {\n hasNextPage: boolean;\n count: number;\n };\n};\n\ntype GateEntityWithRequest = Extract<GateEntity, { last_request?: any }>;\n\nexport interface GateEditWorkspaceRuleRequest extends GateGenericRequest {\n type: \"EDIT_WORKSPACE_RULE\";\n target_type: \"WORKSPACE_RULE\";\n workspace_rule: GateWorkspaceRule;\n request_data: {\n steps: GateWorkspaceRuleStep[];\n };\n}\n\nexport type GateRequest =\n | NonNullable<GateEntityWithRequest[\"last_request\"]>\n | GateAPIV2UserAccessRequest\n | GateEditWorkspaceRuleRequest\n | GateOrganizationRequest\n | GateActivateRequest;\n\nexport type GateRequestType = GateRequest[\"type\"];\n\nexport type GateEntity =\n | GateAPIKey\n | GateAccount\n | GateExchange\n | GateExchange\n | GateGroup\n | GateMessage\n | GatePolicy\n | GateSCIConfig\n | GateTransaction\n | GateUser\n | GateVaultEntity\n | GateWhitelist\n | GatePledgeIncrement\n | GateWorkspaceRule\n | GateRepledge\n | GateForcedUnpledge\n | GateDigestGroup\n | GateTransfer\n | GateTradelink\n | GateTradelinkExchange\n | GateTradelinkAssetManager;\n\nexport type GatePledgeIncrement = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\";\n account_id: number;\n data: {\n amount: string;\n };\n last_request?: GatePledgeIncrementRequest;\n};\nexport type GateRepledge = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\";\n account_id: number;\n data: {\n pledge_id: number;\n settlement_id: string;\n account_name: string;\n exchange_name: string;\n amount: string;\n currency: string;\n };\n last_request?: GateRepledgeRequest;\n};\n\nexport type GateForcedUnpledge = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\";\n account_id: number;\n data: {\n pledge_id: number;\n account_name: string;\n currency: string;\n exchange_name: string;\n };\n pledge_id: string;\n last_request?: GateForcedUnpledgeRequest;\n};\n\nexport type TradelinkNetwork = {\n id: string;\n custodian: GateTradelinkThirdParty<\"CUSTODIAN\">;\n asset_managers: GateTradelinkThirdParty<\"ASSET_MANAGER\">[];\n exchanges: GateTradelinkThirdParty<\"EXCHANGE\">[];\n};\nexport type GateTradelink = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\" | \"ACTIVE\" | \"ABORTED\";\n hsm_groups: {\n arbitration_groups: GateGroup[];\n settlement_groups: GateGroup[];\n withdraw_groups: GateGroup[];\n };\n network: TradelinkNetwork;\n\n last_request?: GateTradelinkRequest;\n};\n\ntype TradelinkInternalGroup = {\n quorum: number;\n users: Array<{ id: number; pub_key: string; username: string }>;\n};\ntype TradelinkInternalWhitelist = {\n id: number;\n addresses: Array<Omit<GateAddress, \"id\">>;\n};\n\nexport type GateTradelinkExchange = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\" | \"ACTIVE\" | \"ABORTED\";\n last_request?: GateTradelinkExchangeRequest;\n is_under_edit: boolean;\n network: TradelinkNetwork;\n network_data: TradelinkNetwork[\"exchanges\"][number];\n front_data: {\n pledge_approval_group: TradelinkInternalGroup;\n settlement_creator_group: TradelinkInternalGroup;\n whitelist: TradelinkInternalWhitelist;\n };\n hsm_data: {\n name: string;\n pledge_approval_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n settlement_creator_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n };\n};\n\nexport type GateTradelinkAssetManager = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\" | \"ACTIVE\" | \"ABORTED\";\n last_request?: GateTradelinkAssetManagerRequest;\n is_under_edit: boolean;\n network: TradelinkNetwork;\n network_data: TradelinkNetwork[\"asset_managers\"][number];\n front_data: {\n pledge_creator_group: TradelinkInternalGroup;\n settlement_approval_group: TradelinkInternalGroup;\n whitelist: TradelinkInternalWhitelist;\n };\n hsm_data: {\n name: string;\n pledge_creator_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n settlement_approval_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n };\n};\n\nexport type GateDeviceType = \"API\" | \"PSD\" | \"SOFT_PSD\";\n\nexport type GateUser = {\n id: number;\n entityType: \"USER\";\n is_api?: boolean;\n view_all_override?: boolean;\n pub_key: string;\n username: string;\n user_id: string;\n picture?: string;\n created_on: string;\n status: string;\n email?: string;\n role: \"ADMIN\" | \"OPERATOR\";\n last_request?: GateUserRequest;\n device_type: GateDeviceType;\n app_version?: string;\n};\n\nexport type GateAPIKey = {\n id: number;\n secret?: string;\n entityType: \"VAULT_API_KEY\";\n name: string;\n created_on: string;\n updated_on: string;\n status:\n | \"PENDING_APPROVAL\"\n | \"APPROVED\"\n | \"ACTIVE\"\n | \"SUSPENDED\"\n | \"PENDING_REVOCATION\"\n | \"REVOKED\"\n | \"ABORTED\";\n entities: GateVaultEntity[];\n scopes: Record<string, any>;\n identifier: string;\n last_request?: GateAPIKeyRequest;\n};\n\nexport type GateTransfer = {\n id: number;\n amount: string;\n network: string | null;\n recipient: string;\n status: \"PENDING\" | \"APPROVED\" | \"SUBMITTED\" | \"ABORTED\";\n last_request: GateTransferRequest;\n};\n\nexport type GateSCIConfig = {\n id: number;\n entityType: \"SCI_CONFIG\";\n account: Omit<GateAccount, \"sci_config\">;\n sciconfig: {\n dapps: string[];\n custom_contract_call_enabled: boolean;\n };\n status: \"PENDING\" | \"ACTIVE\";\n last_request?: GateSCIConfigRequest;\n};\n\ntype MessageType = \"EIP191\" | \"EIP712\";\n\nexport type GateMessage = {\n account_id: number;\n data: string | Record<string, any>;\n id: number;\n message_type: MessageType;\n signature: string | null;\n der_signature: string | null;\n status: \"PENDING_APPROVAL\" | \"APPROVED\" | \"SIGNED\" | \"ABORTED\";\n type: \"MESSAGE_SIGNING_ALLOWED\";\n entityType: \"MESSAGE_SIGNING\";\n created_on?: string;\n notes: GateTransactionNote[];\n last_request?: GateMessageRequest;\n};\n\nexport type AdminDevice = [username: string, index: number];\n\nexport type GateGroup = {\n id: number;\n name: string;\n entityType: \"GROUP\";\n created_on: string;\n created_by: GateUser;\n description?: string;\n status: \"ACTIVE\" | \"PENDING\" | \"REVOKED\" | \"ABORTED\" | \"TO_MIGRATE\";\n is_internal: boolean;\n members: GateUser[];\n is_under_edit: boolean;\n last_request?: GateGroupRequest;\n is_tradelink?: boolean;\n};\n\ntype GateDigestSignature = {\n der: string;\n r: number;\n s: number;\n v: number | null;\n pub_key: string;\n};\n\ntype GateDigest = {\n digest: string;\n derivation_path: string;\n signature?: GateDigestSignature;\n index?: number;\n};\n\nexport type GateDigestGroup = {\n id: number;\n last_request?: GateDigestsRequest;\n account_id: number;\n created_by: GateUser;\n created_on: string;\n digests_data: GateDigest[];\n // todo check final status with gate\n status: \"PENDING_APPROVAL\" | \"APPROVED\";\n};\n\nexport type UTXOsPickingStrategy = \"MERGE_OUTPUTS\" | \"DEEP_OUTPUTS_FIRST\" | \"OPTIMIZE_SIZE\";\n\nexport type GateFees = {\n gas_price: string;\n gas_limit: string;\n fees_per_byte: string;\n fees: string;\n utxo_picking_strategy?: UTXOsPickingStrategy;\n storage_limit?: number;\n};\n\nexport type GateFeesEIP1559 = {\n base_fees: string;\n gas_limit: string;\n max_fees: string;\n max_fees_buffer_factor: string;\n priority_fees: string;\n};\n\nexport type AccountType =\n | \"Ethereum\"\n | \"Bitcoin\"\n | \"Erc20\"\n | \"Bep20\"\n | \"Ripple\"\n | \"Stellar\"\n | \"Tezos\"\n | \"Solana\"\n | \"Cardano\"\n | \"Polkadot\"\n | \"Tron\";\n\nexport type AccountStatus =\n | \"PENDING_CREATE_IN_HSM\"\n | \"PENDING\"\n | \"APPROVED\"\n | \"PENDING_VIEW_ONLY\"\n | \"ACTIVE\"\n | \"VIEW_ONLY\"\n | \"PENDING_ACTIVATION\"\n | \"ABORTED\"\n | \"ACTIVATION_ABORTED\";\n\nexport type Unit = {\n name: string;\n code: string;\n magnitude: number;\n};\n\ntype AccountSettings = {\n id: number;\n fiat: string;\n currency_unit: Unit;\n unitIndex: number;\n blockchain_explorer: string;\n};\n\nexport type GateRuleMultiAuthStep = { quorum: number; group: GateGroup };\n\nexport type GateRuleMultiAuth = {\n type: \"MULTI_AUTHORIZATIONS\";\n data: GateRuleMultiAuthStep[];\n};\n\nexport type GateRuleThreshold = {\n type: \"THRESHOLD\";\n data: [\n {\n currency_type: \"CRYPTO\";\n max: string | null;\n min: string | null;\n },\n ];\n};\n\nexport type GateRuleWhitelist = {\n type: \"WHITELIST\";\n data: GateWhitelist[];\n};\n\nexport type GateRuleSCI = {\n type: \"SMART_CONTRACT_INTERACTION\";\n data: [{ enabled: boolean }];\n};\n\ntype GateRuleTransactionFilterPreset =\n | \"TEZOS_DELEGATION\"\n | \"POLKADOT_STAKING\"\n | \"DEPLOY_CONTRACT\"\n | \"SOLANA_STAKING\"\n | \"CARDANO_STAKING\"\n | \"RAW_SIGNING\"\n | \"SEND\"\n | \"MESSAGE_SIGNING\"\n | \"CREATE_SPL_TOKEN_ACCOUNT\"\n | \"TRANSFER_SPL_TOKEN\"\n | \"STAKE\";\n\nexport type GateRuleTransactionFilter = {\n type: \"TRANSACTION_FILTER\";\n data:\n | { preset: Exclude<GateRuleTransactionFilterPreset, \"TRANSFER_SPL_TOKEN\"> }\n | { preset: \"TRANSFER_SPL_TOKEN\"; contract_address: string };\n};\n\nexport type GateGovernanceRule =\n | GateRuleMultiAuth\n | GateRuleThreshold\n | GateRuleWhitelist\n | GateRuleSCI\n | GateRuleTransactionFilter;\n\nexport type GateGovernanceRulesSet = {\n name: string;\n rules: GateGovernanceRule[];\n};\n\nexport type WeirdGateRuleMultiAuthStep =\n | { quorum: number; group_id: number }\n | { quorum: number; users: number[] };\n\nexport type WeirdGateRuleMultiAuth = {\n type: \"MULTI_AUTHORIZATIONS\";\n data: WeirdGateRuleMultiAuthStep[];\n};\n\nexport type WeirdGateRuleThreshold = {\n type: \"THRESHOLD\";\n data: [\n {\n currency_type: \"CRYPTO\";\n // *just* when creating threshold, `max` is optional and can't be null\n max?: string;\n min: string | null;\n },\n ];\n};\n\nexport type WeirdGateRuleWhitelist = {\n type: \"WHITELIST\";\n data: number[];\n};\n\nexport type WeirdGateGovernanceRule =\n | WeirdGateRuleMultiAuth\n | WeirdGateRuleThreshold\n | GateRuleSCI\n | GateRuleTransactionFilter\n | WeirdGateRuleWhitelist;\n\nexport type WeirdGateGovernanceRulesSet = {\n name: string;\n rules: WeirdGateGovernanceRule[];\n};\n\nexport type GateLabel = {\n id: number;\n name: string;\n info: {\n color: string;\n description: string;\n };\n};\n\nexport type GateAccountCommon = {\n id: number;\n account_type: AccountType;\n entityType: \"ACCOUNT\";\n address?: string;\n contract_address: string;\n name: string;\n settings: AccountSettings;\n balance: any; //Bignumber\n available_balance: any; //Bignumber\n currency: string;\n parent_balance?: any; //Bignumber\n has_access_to_parent: boolean | null;\n created_on: string;\n governance_rules: GateGovernanceRulesSet[] | null;\n next_governance_rules: GateGovernanceRulesSet[] | null;\n fresh_addresses: any;\n nfts_gallery_enabled?: boolean;\n is_hsm_coin_app_updated: boolean;\n is_under_edit: boolean;\n index: number;\n status: AccountStatus;\n xpub: string;\n parent: number | null;\n derivation_path: string;\n labels: GateLabel[];\n extended_public_key: {\n public_key: string;\n chain_code: string;\n };\n derivation_mode: \"STANDARD\" | \"NATIVE_SEGWIT\";\n entity_id?: number;\n last_request?: GateAccountRequest;\n is_tradelink?: boolean;\n tradelink_data?: GateAccountTradelinkData;\n synced_on: string | null;\n last_sync_requested_at: string | null;\n policy?: GatePolicy;\n is_raw_signing_account?: boolean;\n};\n\nexport interface GateAccountExchangeOptions {\n auto_repledge_enabled: boolean;\n requires_pre_approval: boolean;\n}\nexport interface GateAccountTradelinkData {\n asset_manager: GateTradelinkAssetManager;\n custodian: GateTradelinkThirdParty<\"CUSTODIAN\">;\n exchanges: Array<GateTradelinkExchange & GateAccountExchangeOptions>;\n total_repledge: string;\n}\n\nexport interface GateAccountEthereum extends GateAccountCommon {\n account_type: \"Ethereum\";\n sci_config: GateSCIConfig | null;\n ethereum_data?: {\n staking?: {\n total_staking: string;\n total_rewards: string;\n available_rewards: string;\n network_apy: string;\n };\n };\n}\n\nexport interface GateTradelinkThirdParty<T extends \"CUSTODIAN\" | \"ASSET_MANAGER\" | \"EXCHANGE\"> {\n code: string;\n id: string;\n logo_url: string | null;\n name: string;\n role: T;\n}\n\nexport interface GateTradelinkRequest extends GateGenericRequest {\n tradelink: GateTradelink;\n type: \"CREATE_TRADELINK\" | \"EDIT_TRADELINK\";\n target_type: \"TRADELINK\";\n edit_data?: {\n operators: string[]; // pub_keys\n };\n}\n\nexport interface GateTradelinkExchangeRequest extends GateGenericRequest {\n tradelink: GateTradelinkExchange;\n type: \"CREATE_TRADELINK_EXCHANGE\" | \"EDIT_TRADELINK_EXCHANGE\";\n target_type: \"TRADELINK_EXCHANGE\";\n tradelink_exchange: GateTradelinkExchange;\n edit_data?: {\n operators: string[]; // pub_keys\n addresses: Array<Omit<GateAddress, \"id\">>;\n };\n}\n\nexport interface GateTradelinkAssetManagerRequest extends GateGenericRequest {\n tradelink: GateTradelinkAssetManager;\n type: \"CREATE_TRADELINK_ASSET_MANAGER\" | \"EDIT_TRADELINK_ASSET_MANAGER\";\n target_type: \"TRADELINK_ASSET_MANAGER\";\n tradelink_asset_manager: GateTradelinkAssetManager;\n edit_data?: {\n operators: string[]; // pub_keys\n addresses: Array<Omit<GateAddress, \"id\">>;\n };\n}\n\nexport type SPLToken = {\n token_name: string;\n associated_token_account: string;\n account_name: string;\n contract_address: string;\n available: string;\n pending: string;\n status: \"ACTIVE\" | \"INACTIVE\" | \"VIEW_ONLY\";\n ticker: string;\n creation_transaction_hash: string;\n parent_id: number;\n};\n\nexport interface GateAccountBitcoin extends GateAccountCommon {\n account_type: \"Bitcoin\";\n}\nexport interface GateAccountERC20 extends GateAccountCommon {\n account_type: \"Erc20\";\n parent_available_balance: BigNumber;\n}\nexport interface GateAccountRipple extends GateAccountCommon {\n account_type: \"Ripple\";\n}\nexport interface GateAccountStellar extends GateAccountCommon {\n account_type: \"Stellar\";\n}\nexport interface GateAccountTezos extends GateAccountCommon {\n account_type: \"Tezos\";\n}\nexport interface GateAccountSolana extends GateAccountCommon {\n account_type: \"Solana\";\n solana_data?: {\n tokens?: SPLToken[];\n can_create_spl_token_accounts: boolean;\n };\n}\nexport interface GateAccountCardano extends GateAccountCommon {\n account_type: \"Cardano\";\n cardano_data: {\n balances: CardanoBalances;\n };\n}\nexport interface GateAccountTron extends GateAccountCommon {\n account_type: \"Tron\";\n tron_data: {\n balances: TronBalances;\n };\n}\n\nexport interface GateAccountPolkadot extends GateAccountCommon {\n account_type: \"Polkadot\";\n polkadot_data: PolkadotAccountData;\n}\n\nexport type GateAccount =\n | GateAccountEthereum\n | GateAccountBitcoin\n | GateAccountERC20\n | GateAccountStellar\n | GateAccountTezos\n | GateAccountSolana\n | GateAccountPolkadot\n | GateAccountRipple\n | GateAccountCardano\n | GateAccountTron;\n\nexport type GateVaultEntityStatus = \"PENDING\" | \"ACTIVE\" | \"ABORTED\" | \"REVOKED\" | \"TO_MIGRATE\";\n\nexport type GateWorkspacePermission = \"ROOT\" | \"CREATE_ACCOUNT_WITH_POLICY\";\n\nexport type GateWorkspaceRuleStep = {\n quorum: number;\n users: string[]; // array of public keys\n};\n\nexport type GateWorkspaceRule = {\n id: number;\n permission: GateWorkspacePermission;\n status: \"ACTIVE\";\n steps: GateWorkspaceRuleStep[];\n\n // Gate will never serialize them, but assigning the key to respect what's in all the other entities\n last_request: null;\n};\n\nexport type GateExchange = {\n id: number;\n entityType: \"EXCHANGE\";\n created_by: GateUser;\n created_on: string;\n balances: {\n available: string;\n locked: string;\n total: string;\n };\n governance_rules: GateGovernanceRulesSet[] | null;\n last_request: GateExchangeRequest;\n name: string;\n platform: string;\n status: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type GatePolicy = {\n id: number;\n entityType: \"POLICY\";\n created_by: GateUser;\n created_on: string;\n last_request: GatePolicyRequest;\n name: string;\n currency: string;\n description: string | null;\n governance_rules: GateGovernanceRulesSet[];\n account_ids: GateAccount[\"id\"][];\n status: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type GateTradelinkEntity<T extends \"CUSTODIAN\" | \"ASSET_MANAGER\" | \"EXCHANGE\"> = Omit<\n GateTradelinkThirdParty<T>,\n \"role\"\n>;\n\nexport type GateTradelinkNetwork = {\n id: string;\n asset_managers: GateTradelinkEntity<\"ASSET_MANAGER\">[];\n custodian: GateTradelinkEntity<\"CUSTODIAN\">;\n exchanges: GateTradelinkEntity<\"EXCHANGE\">[];\n};\n\nexport type GateTradelinkOnboardingStatus = {\n status:\n | \"NOT_READY\"\n | \"READY_TO_ONBOARD\"\n | \"CUSTODIAN_ONBOARDED\"\n | \"EXCHANGE_ONBOARDED\"\n | \"HSM_READY\";\n};\n\nexport type GateVaultEntity = {\n id: number;\n entityType: \"VAULT_ENTITY\";\n name: string;\n accounts: GateAccount[];\n status: GateVaultEntityStatus;\n created_on: string;\n last_request?: GateVaultEntityRequest;\n};\n\ntype WhitelistType = \"TRANSACTION\" | \"SMART_CONTRACT\";\n\nexport type GateWhitelist = {\n id: number;\n name: string;\n entityType: \"WHITELIST\";\n description: string;\n addresses: GateAddress[];\n created_on: string;\n created_by: GateUser;\n approvals: Approval[];\n status: \"ACTIVE\" | \"PENDING\" | \"ABORTED\" | \"REVOKED\" | \"TO_MIGRATE\";\n last_request?: GateWhitelistRequest;\n whitelist_type?: WhitelistType;\n is_tradelink?: boolean;\n};\n\ntype GateTransactionNote = {\n title: string;\n content: string;\n};\n\nexport type GateTransactionType =\n | \"SEND\"\n | \"RECEIVE\"\n | \"PREBURN\"\n | \"BURN\"\n | \"MINT\"\n | \"DELEGATE\"\n | \"UNDELEGATE\"\n | \"DELEGATE_VOTE_TO_DREP\"\n | \"STAKING_REGISTER\"\n | \"STAKING_DEREGISTER\"\n | \"STAKING_DELEGATE\"\n | \"STAKING_WITHDRAW\"\n | \"CREATE_SPL_TOKEN_ACCOUNT\";\n\nexport type CardanoVoteDelegationDrep = \"ALWAYS ABSTAIN\" | null;\n\nexport type GateTransaction = {\n id: number;\n account_id: number;\n recipient: string;\n type: GateTransactionType;\n created_on: string;\n created_by: GateUser;\n labels: GateLabel[];\n tx_hash: string;\n status:\n | \"ABORTED\"\n | \"APPROVED\"\n | \"CONFIRMED\"\n | \"DROPPED\"\n | \"FAILED\"\n | \"FAILED_TO_BROADCAST\"\n | \"PENDING_APPROVAL\"\n | \"PENDING_CREATE_IN_HSM\"\n | \"SIGNED\"\n | \"SUBMITTED\";\n amount: string;\n max_fees?: string;\n notes: GateTransactionNote[];\n last_request?: GateTransactionRequest;\n failure_reason?: string | null;\n tx_parameters?: {\n drep?: CardanoVoteDelegationDrep;\n tradelink?: {\n type: \"SETTLEMENT\";\n settlement_id: string;\n pledge_id: string;\n };\n token_address?: string;\n };\n};\n\ntype Approval = {\n created_on: string;\n created_by: GateUser;\n type: \"APPROVE\" | \"ABORT\";\n};\n\nexport type GateAddress = {\n id: number;\n currency: string;\n address: string;\n name: string;\n destination_tags?: number[] | null;\n};\n\nexport type GateGenericRequest = {\n entityType: \"REQUEST\";\n created_by: GateUser | null;\n created_on: string;\n id: number;\n status: string;\n type: string;\n approvals?: RequestApproval[];\n approvals_steps: Array<{\n group: GateGroup;\n quorum: number;\n }>;\n current_step: number;\n target_id: number;\n target_type: string;\n quorum?: number;\n organization?: Organization;\n expired_at: Date;\n edit_data?: any;\n};\n\nexport interface GateAccountRequest extends GateGenericRequest {\n // TODO we probably want to have GateAccountBitcoin/Ethereum..etc.. based on target_type\n account: GateAccount;\n target_type:\n | \"BITCOIN_ACCOUNT\"\n | \"ETHEREUM_ACCOUNT\"\n | \"RIPPLE_ACCOUNT\"\n | \"TEZOS_ACCOUNT\"\n | \"POLKADOT_ACCOUNT\"\n | \"ERC20_ACCOUNT\"\n | \"STELLAR_ACCOUNT\"\n | \"SOLANA_ACCOUNT\"\n | \"CARDANO_ACCOUNT\"\n | \"TRON_ACCOUNT\";\n type:\n | \"CREATE_ACCOUNT\"\n | \"EDIT_ACCOUNT\"\n | \"REVOKE_ACCOUNT\"\n | \"EDIT_TOKEN_RULE\"\n | \"MIGRATE_ACCOUNT\"; // TODO migration code should be remove;\n request_data: Partial<{\n currency: { name: string };\n derivation_mode: string;\n entity_id: number | null;\n governance_rules: GateGovernanceRulesSet[];\n name: string;\n }>;\n}\n\nexport interface GateSPLTokenAccountRequest extends GateGenericRequest {\n account: GateAccount;\n target_type: \"SOLANA_ACCOUNT\";\n type: \"EDIT_TOKEN_RULE\";\n target_id: number;\n edit_data: {\n governance_rules: GateGovernanceRulesSet[];\n };\n request_data: Partial<{\n governance_rules: GateGovernanceRulesSet[];\n }>;\n contract_address: string;\n}\n\nexport interface GateActivateRequest extends GateGenericRequest {\n target_type: GateAccountRequest[\"target_type\"];\n target_id: number;\n target: GateAccount;\n type: \"ACTIVATE\";\n}\n\nexport interface GateRepledgeRequest extends GateGenericRequest {\n repledge: GateRepledge;\n target_type: \"REPLEDGE\";\n type: \"CREATE_REPLEDGE\";\n}\nexport interface GatePledgeIncrementRequest extends GateGenericRequest {\n pledge_increment: GatePledgeIncrement;\n target_type: \"PLEDGE_INCREMENT\";\n type: \"CREATE_PLEDGE_INCREMENT\";\n}\nexport interface GateForcedUnpledgeRequest extends GateGenericRequest {\n forced_unpledge: GateForcedUnpledge;\n target_type: \"FORCED_UNPLEDGE\";\n type: \"CREATE_FORCED_UNPLEDGE\";\n}\n\nexport interface GateUserRequest extends GateGenericRequest {\n url_id: string;\n user: GateUser;\n target_type: \"PERSON\";\n type:\n | \"REVOKE_USER\"\n | \"CREATE_ADMIN\"\n | \"CREATE_OPERATOR\"\n | \"CREATE_API_USER\"\n | \"CREATE_API_USER_ACCESS\"\n | \"MIGRATE_ADMIN\"\n | \"MIGRATE_OPERATOR\"; // TODO migration code should be remove\n}\n\nexport interface GateAPIV2UserAccessRequest extends GateGenericRequest {\n username: string;\n user: GateUser;\n api_key_id: string;\n api_key_secret: string;\n target_type: \"PERSON\";\n type: \"CREATE_API_USER\" | \"CREATE_API_USER_ACCESS\";\n}\n\nexport interface GateSCIConfigRequest extends GateGenericRequest {\n sciconfig: GateSCIConfig;\n target_type: \"SCI_CONFIG\";\n type: \"CREATE_SCICONFIG\" | \"EDIT_SCICONFIG\";\n edit_data?: {\n custom_contract_call_enabled: boolean;\n dapps: string[];\n };\n request_data?: {\n custom_contract_call_enabled: boolean;\n dapps: string[];\n };\n}\n\nexport interface GateMessageRequest extends GateGenericRequest {\n target_type: \"MESSAGE\";\n message: GateMessage;\n type: \"MESSAGE_SIGNING\";\n}\n\nexport interface GateWhitelistRequest extends GateGenericRequest {\n whitelist: GateWhitelist;\n target_type: \"WHITELIST\";\n type: \"CREATE_WHITELIST\" | \"EDIT_WHITELIST\" | \"MIGRATE_WHITELIST\"; // TODO migration code should be remove;\n edit_data?: {\n name?: string;\n addresses: GateAddress[];\n };\n}\n\nexport interface GateExchangeRequest extends GateGenericRequest {\n exchange: GateExchange;\n target_type: \"EXCHANGE\";\n type: \"IMPORT_EXCHANGE\" | \"EDIT_EXCHANGE\" | \"EDIT_EXCHANGE_CREDENTIALS\" | \"REVOKE_EXCHANGE\";\n}\n\nexport interface GateTransactionRequest extends GateGenericRequest {\n // TODO we probably want to have GateTransactionBitcoin/Ethereum..etc.. based on target_type\n transaction: GateTransaction;\n target_type:\n | \"BITCOIN_LIKE_TRANSACTION\"\n | \"ETHEREUM_LIKE_TRANSACTION\"\n | \"RIPPLE_LIKE_TRANSACTION\"\n | \"POLKADOT_LIKE_TRANSACTION\"\n | \"TEZOS_LIKE_TRANSACTION\"\n | \"STELLAR_LIKE_TRANSACTION\"\n | \"CARDANO_LIKE_TRANSACTION\";\n type: \"CREATE_TRANSACTION\";\n}\n\nexport const GateGroupRequestTypeDefs = [\n \"CREATE_GROUP\",\n \"EDIT_GROUP\",\n \"REVOKE_GROUP\",\n \"MIGRATE_GROUP\",\n] as const;\n\nexport interface GateGroupRequest extends GateGenericRequest {\n group: GateGroup;\n target_type: \"GROUP\";\n type: (typeof GateGroupRequestTypeDefs)[number]; // TODO migration code should be remove\n}\n\nexport interface GateDigestsRequest extends GateGenericRequest {\n digests: GateDigestGroup;\n target_type: \"DIGESTS\";\n type: \"SIGN_DIGESTS\";\n}\n\nexport interface GateOrganizationRequest extends GateGenericRequest {\n organization: Organization;\n target_type: \"ORGANIZATION\";\n type: \"UPDATE_QUORUM\";\n}\n\nexport interface GateAPIKeyRequest extends GateGenericRequest {\n api_key: GateAPIKey;\n target_type: \"VAULT_API_KEY\";\n type: \"CREATE_API_KEY\" | \"EDIT_API_KEY\" | \"REVOKE_API_KEY\";\n}\n\nexport interface GateTransferRequest extends GateGenericRequest {\n transfer: GateTransfer;\n target_type: \"TRANSFER\";\n type: \"CREATE_TRANSFER\";\n}\n\nexport interface GateVaultEntityRequest extends GateGenericRequest {\n vaultEntity: GateVaultEntity;\n target_type: \"ENTITY\";\n type: \"CREATE_ENTITY\" | \"EDIT_ENTITY\" | \"REVOKE_ENTITY\";\n edit_data?: {\n name: string;\n accounts: number[];\n };\n}\n\nexport interface GatePolicyRequest extends GateGenericRequest {\n policy: GatePolicy;\n target_type: \"POLICY\";\n type: \"CREATE_POLICY\" | \"EDIT_POLICY\";\n}\n\nexport type Organization = {\n name: string;\n domain_name: string;\n workspace: string;\n number_of_admins: number;\n quorum: number;\n};\n\ntype RequestApproval = {\n created_by: GateUser;\n created_on: string;\n type: string;\n step: number;\n};\n\n// a LAM user is referenced by string\nexport type UserDevice = number | string;\n\nexport type ManifestGroup = {\n name: string;\n users: UserDevice[];\n description?: string;\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type ManifestAccountRuleMultiAuthStep =\n | { quorum: number; users: UserDevice[] }\n | { quorum: number; group: string };\n\nexport type ManifestAccountRuleMultiAuth = {\n type: \"MULTI_AUTHORIZATIONS\";\n steps: ManifestAccountRuleMultiAuthStep[];\n};\n\nexport type ManifestAccountRuleSCI = {\n type: \"SMART_CONTRACT_INTERACTION\";\n enabled: boolean;\n};\n\nexport type ManifestAccountRuleTezosDelegation = {\n type: \"TEZOS_DELEGATION\";\n};\nexport type ManifestAccountRulePolkadotStaking = {\n type: \"POLKADOT_STAKING\";\n};\nexport type ManifestAccountRuleDeployContract = {\n type: \"DEPLOY_CONTRACT\";\n};\nexport type ManifestAccountRuleSolanaStaking = {\n type: \"SOLANA_STAKING\";\n};\nexport type ManifestAccountRuleCardanoStaking = {\n type: \"CARDANO_STAKING\";\n};\nexport type ManifestAccountRuleRawSigning = {\n type: \"RAW_SIGNING\";\n};\nexport type ManifestAccountRuleSend = {\n type: \"SEND\";\n};\nexport type ManifestAccountRuleStake = {\n type: \"STAKE\";\n};\nexport type ManifestAccountRuleMessageSigning = {\n type: \"MESSAGE_SIGNING\";\n};\n\nexport type ManifestAccountRuleCreateSplTokenAccount = {\n type: \"CREATE_SPL_TOKEN_ACCOUNT\";\n};\n\nexport type ManifestAccountRuleTransferSplToken = {\n type: \"TRANSFER_SPL_TOKEN\";\n contractAddress: string;\n};\n\nexport type ManifestAccountRuleWhitelist = {\n type: \"WHITELIST\";\n whitelists: string[];\n};\n\nexport type ManifestAccountRuleThreshold = {\n type: \"THRESHOLD\";\n min?: number;\n max?: number;\n};\n\nexport type ManifestAccountRule =\n | ManifestAccountRuleMultiAuth\n | ManifestAccountRuleWhitelist\n | ManifestAccountRuleSCI\n | ManifestAccountRuleDeployContract\n | ManifestAccountRuleThreshold\n | ManifestAccountRulePolkadotStaking\n | ManifestAccountRuleSolanaStaking\n | ManifestAccountRuleCardanoStaking\n | ManifestAccountRuleRawSigning\n | ManifestAccountRuleTezosDelegation\n | ManifestAccountRuleSend\n | ManifestAccountRuleMessageSigning\n | ManifestAccountRuleCreateSplTokenAccount\n | ManifestAccountRuleTransferSplToken\n | ManifestAccountRuleStake;\n\nexport type ManifestAccountConfig = {\n nftGallery?: boolean;\n};\n\ntype ManifestTradelinkOrg = {\n name: string;\n};\n\ntype AccountTradelinkExchangeData = {\n name: string;\n requires_pre_approval: boolean;\n auto_repledge_enabled: boolean;\n};\n\nexport type ManifestAccountTradelinkData = {\n currency: string;\n custodian: ManifestTradelinkOrg;\n asset_manager: ManifestTradelinkOrg;\n exchanges: AccountTradelinkExchangeData[];\n};\n\ntype ManifestCryptoAccount = {\n name: string;\n currency: string;\n accountType?: string;\n derivationMode?: string;\n rules?: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ABORTED\" | \"ACTIVE\";\n index?: number;\n readOnly?: {\n xpub: string;\n publicKey: string;\n chainCode: string;\n address?: string;\n };\n tradelink_data?: ManifestAccountTradelinkData;\n // all the fields that doesn't require a request to be changed\n config?: ManifestAccountConfig;\n};\n\ntype ManifestERC20Account = {\n name: string;\n contractAddress: string;\n parentAccount?: string;\n rules?: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ABORTED\" | \"ACTIVE\";\n index?: number;\n tradelink_data?: ManifestAccountTradelinkData;\n};\n\nexport type ManifestAccount = ManifestCryptoAccount | ManifestERC20Account;\n\nexport type ManifestVaultEntity = {\n name: string;\n accounts?: string[];\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type ManifestWhitelistAddress = {\n currency: string;\n name?: string;\n address: string;\n destination_tags?: number[] | null;\n};\n\nexport type ManifestWhitelist = {\n name: string;\n addresses: ManifestWhitelistAddress[];\n description?: string;\n status?: \"PENDING\" | \"ABORTED\";\n type?: WhitelistType;\n};\n\nexport type ManifestUser = {\n device: number;\n};\n\nexport type ManifestAPIUser = {\n name: string;\n viewAll?: boolean;\n};\n\nexport type ManifestAPIV2User = {\n name: string;\n role: string;\n publicKey?: string;\n viewAll?: boolean;\n};\n\nexport type ManifestExchange = {\n name: string;\n platform: string;\n rules?: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n\n // note for the future: one day we will be able to put\n // extra fields in the configuration, for now, all exchanges\n // receive `apiKey` and `secret` only\n configuration: {\n apiKey: string;\n apiSecret: string;\n };\n};\n\nexport type ManifestPolicy = {\n name: string;\n currency: string;\n rules: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type ManifestWorkspaceRuleStep = {\n quorum: number;\n users: string[]; // array of api admin usernames\n};\n\nexport type ManifestWorkspaceRule = {\n permission: Exclude<GateWorkspacePermission, \"ROOT\">;\n steps: ManifestWorkspaceRuleStep[];\n};\n\ninterface ManifestCommon {\n salt?: string;\n quorum?: number;\n customUsernames?: Record<string, string>;\n groups?: ManifestGroup[];\n accounts?: ManifestAccount[];\n entities?: ManifestVaultEntity[];\n whitelists?: ManifestWhitelist[];\n exchanges?: ManifestExchange[];\n policies?: ManifestPolicy[];\n tradelink?: ManifestTradelink;\n contractApprovals?: ManifestContractApproval[];\n workspaceRules?: ManifestWorkspaceRule[];\n}\n\nexport type ManifestTradelink = {\n onboarded: boolean;\n exchanges: ManifestTradelinkEntityWithAddresses[];\n assetManagers: ManifestTradelinkEntityWithAddresses[];\n custodians: ManifestTradelinkEntity[];\n};\n\nexport type ManifestTradelinkEntity = {\n id: string;\n name: string;\n logoUrl: string;\n code: string;\n users: {\n operators?: number[];\n apiV2?: string[];\n };\n};\n\nexport type ManifestTradelinkEntityWithAddresses = {\n id: string;\n name: string;\n logoUrl: string;\n code: string;\n users: {\n operators?: number[];\n apiV2: string[];\n };\n addresses: ManifestWhitelistAddress[];\n};\n\nexport type ManifestContractApproval = {\n user: number;\n contractNames: string[];\n};\n\nexport interface Manifest extends ManifestCommon {\n users?: {\n operators?: Array<number | ManifestUser>;\n admins?: Array<number | ManifestUser>;\n api?: Array<string | ManifestAPIUser>;\n apiV2?: Array<ManifestAPIV2User>;\n };\n}\n\nexport interface DeserializedManifest extends ManifestCommon {\n users?: {\n operators?: ManifestUser[];\n admins?: ManifestUser[];\n api?: ManifestAPIUser[];\n apiV2?: ManifestAPIV2User[];\n };\n}\n\nexport const feesLevels = [\"SLOW\", \"NORMAL\", \"FAST\", \"CUSTOM\"] as const;\nexport type FeesLevel = (typeof feesLevels)[number];\n\nexport type ManifestTransaction = {\n // account name\n account: string;\n // recipient address\n recipient: string;\n // transaction amount in default unit (e.g BTC)\n amount: string | number;\n utxosPickingStrategy?: UTXOsPickingStrategy;\n contractPayload?: string;\n transactionType?: GateTransactionType;\n feesLevel?: FeesLevel;\n gasPrice?: string;\n gasLimit?: string;\n title?: string;\n comment?: string;\n maxFees?: string;\n\n // EIP1559-specific\n baseFees?: string;\n maxFeesBufferFactor?: string;\n priorityFees?: string;\n};\n\nexport type OnboardingContext = {\n pool: DevicesPool;\n getState: () => Promise<any>;\n getChallenge: () => Promise<any>;\n next: (data?: any) => Promise<void>;\n collectMasterSeedFragment: (challenge: any, deviceIndex: number) => Promise<void>;\n validateSO: (challenge: any, deviceIndex: number) => Promise<void>;\n registerAdmin: (data: any, deviceIndex: number) => Promise<void>;\n registerSO: (data: any, deviceIndex: number) => Promise<void>;\n registerWrappingKey: (challenge: any, deviceIndex: number) => Promise<void>;\n};\n\nexport type OnboardingStep =\n | \"WRAPPING_KEYS_REGISTRATION\"\n | \"ADMINS_REGISTRATION\"\n | \"QUORUM_SETTINGS\"\n | \"SHARED_OWNERS_REGISTRATION\"\n | \"ADMIN_APPROVALS\"\n | \"MASTER_SEED_GENERATION\";\n\nexport interface RecordLogger extends Logger {\n logs: string[];\n reset: () => void;\n expect: (s: string) => void;\n}\n\nexport type RunnableOptions = {\n logger?: Logger;\n};\n\nexport type MockNetworkResponse = [\n string, // verb: GET, POST, ...\n string, // url\n number, // returned status code\n any?, // returned data\n any?, // expected request payload\n any?, // returned headers\n any?, // expected request headers\n];\n\nexport type LegacyERC20Token = {\n blockchain_name: \"foundation\" | \"ropsten\" | \"goerli\";\n contract_address: string;\n decimals: number;\n hsm_account_parameters: string;\n hsm_signature: string;\n name: string;\n ticker: string;\n};\n\nexport type GateCoinCapabilities = {\n signer: {\n raw_signing_supported: boolean;\n send_clear_signing_supported: boolean;\n stake_clear_signing_supported: boolean;\n };\n wallet: {\n balance_supported: boolean;\n broadcast_supported: boolean;\n crafting_supported: boolean;\n tx_history_supported: boolean;\n };\n};\n\nexport type GateTokenCurrency = {\n contract_address: string;\n family: \"ethereum\";\n name: string;\n parent_currency: \"ethereum\" | \"ethereum_ropsten\" | \"ethereum_goerli\" | \"bsc\";\n ticker: string;\n token_type: \"erc20\" | \"stablecoin\" | \"bep20\";\n units: [Unit];\n delisted?: boolean;\n disable_countervalue?: boolean;\n capabilities?: GateCoinCapabilities;\n\n // FIXME: here only for retro-compatibility with gate < 3.6 (that expect front to send hsm parameters)\n __legacy_hsm_account_parameters?: string;\n __legacy_hsm_signature?: string;\n};\n\nexport type GateCurrency = {\n name: string;\n type: \"CRYPTO\";\n family: string;\n confirmations_needed: number;\n units: Unit[];\n capabilities?: GateCoinCapabilities;\n};\n\n// surprisingly the gate expect some fields to change\n// from the erc20 token *it literally send* us\nexport type WeirdGateERC20Token = {\n ticker: string;\n address: string;\n decimals: number;\n hsm_signature: string;\n hsm_account_parameters: string;\n};\n\nexport type WeirdGateTokenCurrency = {\n type: \"erc20\" | \"stablecoin\";\n address: string;\n};\n\nexport type DaemonAddress = {\n address: string;\n derivation_path: string;\n};\n\nexport type VaultEvent =\n | Ev<\"ACCOUNT_UPDATED\", GateAccount>\n | Ev<\"REQUEST_CREATED\", GateRequest>\n | Ev<\"REQUEST_ABORTED\", GateRequest>\n | Ev<\"REQUEST_APPROVAL\", GateRequest>\n | Ev<\"REQUEST_APPROVED\", GateRequest>\n | Ev<\"TRANSACTION_BROADCASTED\", GateTransaction>\n | Ev<\"TRANSACTION_RECEIVED\", GateTransaction>\n | Ev<\"TRANSACTION_FAILED\", GateTransaction>\n | Ev<\"USER_REGISTERED\", GateUser>\n | Ev<\"USER_SUSPENDED\", GateUser>;\n\ntype Ev<T, P> = { type: T; payload: P };\n\nexport type { CryptoCurrency, TokenCurrency };\nexport type UserWithDevice = { deviceIndex: number; user: GateUser };\nexport type UserWithoutDevice = { username: string; user: GateUser };\n\nexport type CurrencyOrToken = CryptoCurrency | TokenCurrency;\n\nexport type Network = <T>(\n method: \"POST\" | \"PUT\" | \"GET\" | \"DELETE\",\n url: string,\n data?: any,\n requestOptions?: any,\n) => Promise<T>;\n\nexport type WipeOptions = {\n gate: string;\n lam?: string;\n lamAPIKey?: string;\n hsmCompartmentID: number;\n hsmEndpoint: string;\n hsmCert: Buffer;\n hsmCertKey: Buffer;\n monotonicCountersSize?: number;\n fileSystemSize?: number;\n};\n\nexport interface BakeManifestOptions extends RunnableOptions {\n noApproval?: boolean;\n runner?: ManifestRunner;\n untilStep?: OnboardingStep;\n twoStepsRequest?: boolean;\n waitForActive?: boolean;\n\n // revault-compat onboarding\n revaultOnboarding?: {\n compartmentId: number;\n hsmScriptsVersion: string;\n revaultApiUrl: string;\n revaultRootAuthToken: string;\n };\n}\n\n// 'MR' stands for 'ManifestRunner'\ntype MRAction<P, R> = (params: P) => Promise<R>;\n\nexport type MRCreateUserParams = {\n role: \"admin\" | \"operator\";\n userID: string;\n name: string;\n device: number;\n};\n\nexport type MRCreateAPIUserParams = {\n user: ManifestAPIUser;\n userID: string;\n name: string;\n};\n\nexport type MRCreateAPIV2UserParams = {\n user: ManifestAPIV2User;\n publicKey: string;\n role: string;\n name: string;\n};\n\nexport type MRBakeGroupParams = {\n group: ManifestGroup;\n data: DataGroup;\n existingRequest: GateGroupRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakeAccountParams = {\n account: ManifestAccount;\n data: DataAccount;\n existingRequest: GateAccountRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n waitForActive?: boolean;\n tradelinkAM?: ManifestAPIV2User;\n};\n\nexport type MRBakeVaultEntityParams = {\n vaultEntity: ManifestVaultEntity;\n data: DataVaultEntity;\n existingRequest: GateVaultEntityRequest | null;\n noApproval: boolean;\n};\n\nexport type MRBakeWhitelistParams = {\n whitelist: ManifestWhitelist;\n data: DataWhitelist;\n existingRequest: GateWhitelistRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakeExchangeParams = {\n exchange: ManifestExchange;\n data: DataExchange;\n existingRequest: GateExchangeRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakePolicyParams = {\n policy: ManifestPolicy;\n data: DataPolicy;\n existingRequest: GatePolicyRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakeTradelinkOnboardingParams = {\n type: \"CREATE_TRADELINK\";\n operators: string[];\n};\n\nexport type MREditQuorumParams = {\n quorum: number;\n};\n\nexport type MREditWorkspaceRuleParams = {\n rule: ManifestWorkspaceRule;\n usersByName: Record<string, GateUser>;\n};\n\nexport type MBRBakeTradelinkEntityWithAddresses = {\n operators: string[];\n addresses: ManifestWhitelistAddress[];\n name: string;\n};\n\nexport type MRBakeTradelinkEntityParams = {\n tradelinkEntity: ManifestTradelinkEntity | ManifestTradelinkEntityWithAddresses;\n type: \"asset_managers\" | \"exchanges\" | \"custodians\";\n};\n\nexport type MRBakeTradelinkEntityOnboardingParams = {\n tradelinkEntity: MBRBakeTradelinkEntityWithAddresses;\n type: \"asset_managers\" | \"exchanges\";\n tradelinkEntityApprover: ManifestAPIV2User; // entity approver, like exchange approver of the exchange\n};\n\nexport type MRBakeTradelinkNetworkParams = {\n custodians: DataTradelinkNetworkEntity<\"CUSTODIAN\">[];\n exchanges: DataTradelinkNetworkEntity<\"EXCHANGE\">[];\n assetManagers: DataTradelinkNetworkEntity<\"ASSET_MANAGER\">[];\n};\n\nexport type DataTradelinkNetworkEntity<T extends \"CUSTODIAN\" | \"EXCHANGE\" | \"ASSET_MANAGER\"> = Pick<\n GateTradelinkThirdParty<T>,\n \"id\" | \"name\"\n>;\n\nexport type ManifestRunner = {\n editQuorum: (params: MREditQuorumParams) => Promise<void>;\n editWorkspaceRule: (params: MREditWorkspaceRuleParams) => Promise<void>;\n\n createUser: MRAction<MRCreateUserParams, GateUserRequest>;\n createAPIUser: (\n params: MRCreateAPIUserParams,\n r: RecipeManifestResult,\n ) => Promise<GateUserRequest>;\n createAPIV2User: MRAction<MRCreateAPIV2UserParams, GateUserRequest>;\n createAPIV2UserAccess: MRAction<MRCreateAPIV2UserParams, GateAPIV2UserAccessRequest>;\n\n createGroup: MRAction<MRBakeGroupParams, GateGroupRequest>;\n editGroup: MRAction<MRBakeGroupParams, GateGroupRequest>;\n\n createAccount: MRAction<MRBakeAccountParams, GateAccountRequest>;\n editAccount: MRAction<MRBakeAccountParams, GateAccountRequest>;\n\n createVaultEntity: MRAction<MRBakeVaultEntityParams, GateVaultEntityRequest>;\n editVaultEntity: MRAction<MRBakeVaultEntityParams, GateVaultEntityRequest>;\n\n createWhitelist: MRAction<MRBakeWhitelistParams, GateWhitelistRequest>;\n editWhitelist: MRAction<MRBakeWhitelistParams, GateWhitelistRequest>;\n\n createExchange: MRAction<MRBakeExchangeParams, GateExchangeRequest>;\n editExchange: MRAction<MRBakeExchangeParams, GateExchangeRequest>;\n\n createPolicy: MRAction<MRBakePolicyParams, GatePolicyRequest>;\n\n createTradelink: MRAction<MRBakeTradelinkOnboardingParams, GateTradelinkRequest>;\n createTradelinkEntity: <T extends \"ASSET_MANAGER\" | \"EXCHANGE\" | \"CUSTODIAN\">(\n params: MRBakeTradelinkEntityParams,\n ) => Promise<GateTradelinkEntity<T>>;\n onboardTradelinkEntity: MRAction<\n MRBakeTradelinkEntityOnboardingParams,\n GateTradelinkExchangeRequest | GateTradelinkAssetManagerRequest\n >;\n createTradelinkNetwork: MRAction<MRBakeTradelinkNetworkParams, GateTradelinkNetwork>;\n};\n\nexport type HsmCertificate = {\n attestation_pub: string;\n certificate: string;\n code_hash: string;\n signature: string;\n};\n\nexport type SecureChannel = {\n request_id: string;\n handshake: string;\n ciphertext: string;\n challenge: string;\n u2f_register_data: string;\n // defined for user registration\n handshake_attestation?: HsmCertificate;\n};\n\n// TODO centralize types with vault-remote\nexport type DeploymentStepID =\n | \"checkConnectivity\"\n | \"createNamespace\"\n | \"installNamespace\"\n | \"setupFeatureFlagsProvider\"\n | \"waitPods\"\n | \"success\";\n\nexport type DeploymentStep = {\n key: DeploymentStepID;\n labelWaiting: string;\n labelCurrent: string;\n labelSuccess: string;\n};\n\nexport type MVInstanceDeploymentFF = { key: string; set: boolean };\n\nexport type MVInstanceDeployment = {\n id: string;\n\n startedOn: Date;\n finishedOn: Date | null;\n\n status: \"BUSY\" | \"SUCCESS\" | \"ERROR\";\n steps: DeploymentStep[];\n currentStep: DeploymentStepID;\n\n instance: MVInstance;\n flags: Array<MVInstanceDeploymentFF>;\n\n error: Error | null;\n spawnFailTimeout?: ReturnType<typeof setTimeout>;\n};\n\nexport type MVPod = {\n name: string;\n podName: string;\n status: \"BUSY\" | \"HEALTHY\" | \"ERROR\" | \"EVICTED\";\n};\n\nexport type MVInstance = {\n name: string;\n status: string;\n host: string;\n pods: MVPod[];\n};\n\nexport type InteractionResponses = {\n network: Network;\n transport: any;\n secure_channel: any;\n pairing_payload: any;\n blob: any;\n confidentiality_key: any;\n attestation: any;\n u2f_key: any;\n onboardingRegisterChallenge: any;\n role: any;\n username: any;\n register_data: any;\n validation_key: any;\n u2f_register: any;\n validate_device: any;\n attested_handshake: any;\n};\n\nexport type Interaction<T> = {\n responseKey: string;\n action: (responses: InteractionResponses) => Promise<T>;\n device?: boolean;\n};\n\nexport type GetU2FPubKeyInteraction = Interaction<{\n pubKey: string;\n signature: Buffer;\n}>;\n\nexport type Interactions = {\n approveFlow: Interaction<any>[];\n approveFlowWithoutHSM: Interaction<any>[];\n doStartKpatternAsResponder: Interaction<any>;\n validateDevice: Interaction<any>;\n validatePayload: Interaction<any>;\n postApproval: Interaction<any>;\n postSimpleApproval: Interaction<any>;\n ensurePartitionPairing: Interaction<any>;\n finalizePairing: Interaction<any>;\n getAttestation: Interaction<{ attestation: Buffer }>;\n getConfidentialityPublicKey: Interaction<any>;\n getSecureChannel: Interaction<any>;\n getU2FChallenge: Interaction<any>;\n getU2FPublicKey: GetU2FPubKeyInteraction;\n getValidationPublicKey: Interaction<any>;\n initPairing: Interaction<any>;\n loginFlow: Interaction<any>[];\n operatorGetChallenge: Interaction<any>;\n postU2FSignature: Interaction<any>;\n postUserRegistration: Interaction<any>;\n readOnlyLoginFlow: (userName: string) => Interaction<any>[];\n registerUserFlow: Interaction<any>[];\n u2fAuthenticate: Interaction<any>;\n validateOperation: Interaction<any>[];\n};\n\n// API Types\nexport type APIBearerTokenResponse = {\n access_token: string;\n expires_in: number;\n refresh_token: string;\n session_state: string;\n token_type: string;\n};\n\nexport type APIGetChallengeResponse = {\n challenge: string;\n id: number;\n};\n\n// FIXME properly define this type at this is the response to /request\n// and it handle a lot of type, request target, request id\nexport type APIRequestResponse = {\n id: number;\n status: \"PENDING_APPROVAL\" | \"APPROVED\" | \"SUBMITTED\" | \"ABORTED\";\n};\n\nexport type APICreateTransactionRequest = {\n data: APIBitcoinLikeSend | APIEthereumLikeSend;\n note?: {\n content: string;\n title: string;\n };\n type: \"CREATE_TRANSACTION\";\n};\n\nexport type APIGenericSend = {\n account_id: number;\n fees_strategy: GenericFeesStrategy;\n transaction_data: {\n account_name: string;\n amount: string;\n max_fees: string;\n recipient: string;\n };\n};\n\nexport type APIBitcoinLikeSend = APIGenericSend & {\n transaction_data: {\n currency: \"bitcoin\" | \"bitcoin_testnet\";\n };\n transaction_type: \"BITCOIN_LIKE_SEND\";\n};\n\nexport type APIEthereumLikeSend = APIGenericSend & {\n transaction_data: {\n currency: \"ethereum\" | \"ethereum_sepolia\" | \"polygon\" | \"ethereum_holesky\";\n contract_address?: string;\n };\n transaction_type: \"ETHEREUM_LIKE_SEND\";\n};\n\ntype GenericFeesStrategy = {\n type: \"SPEED\";\n data: {\n speed: \"FAST\" | \"NORMAL\" | \"SLOW\";\n };\n};\n\n// FIXME properly define this type\nexport type APIEstimateFeesResponse = {\n max_fees: string;\n};\n\nexport type PsdModel = \"BLUE\" | \"STAX\";\n"]}
|
package/lib/createHSMBridge.d.ts
CHANGED
|
@@ -451,6 +451,14 @@ type PolkadotAccountData = {
|
|
|
451
451
|
};
|
|
452
452
|
type PolkadotRewardDestination = "Staked" | "Stash";
|
|
453
453
|
|
|
454
|
+
type TronBalances = {
|
|
455
|
+
available: number;
|
|
456
|
+
bandwidth: number;
|
|
457
|
+
energy: number;
|
|
458
|
+
pending: number;
|
|
459
|
+
total: number;
|
|
460
|
+
};
|
|
461
|
+
|
|
454
462
|
type UserContext = {
|
|
455
463
|
network: Network;
|
|
456
464
|
getToken: () => string | null;
|
|
@@ -1062,6 +1070,9 @@ interface GateAccountCardano extends GateAccountCommon {
|
|
|
1062
1070
|
}
|
|
1063
1071
|
interface GateAccountTron extends GateAccountCommon {
|
|
1064
1072
|
account_type: "Tron";
|
|
1073
|
+
tron_data: {
|
|
1074
|
+
balances: TronBalances;
|
|
1075
|
+
};
|
|
1065
1076
|
}
|
|
1066
1077
|
interface GateAccountPolkadot extends GateAccountCommon {
|
|
1067
1078
|
account_type: "Polkadot";
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Network, A as APIBearerTokenResponse, M as Manifest, D as DevicesPool, B as BakeManifestOptions, R as RunnableOptions, P as PoolOptions, a as ManifestAccount, G as GateAccount, b as ManifestAPIV2User, c as APIRequestResponse, d as DeployOptions, e as DestroyOptions, f as PsdModel, g as APIDevice, h as Device, I as Interactions, U as UserContext, i as GateTokenCurrency, j as MVInstance, k as ManifestTransaction, l as ManifestGroup, m as GateWhitelist, n as UTXOsPickingStrategy, o as GateTransaction, p as UpgradeOptions, W as WipeOptions, q as Interaction, T as TransportType } from './index-
|
|
2
|
-
export { cC as APIBitcoinLikeSend, cA as APICreateTransactionRequest, cE as APIEstimateFeesResponse, cD as APIEthereumLikeSend, cB as APIGenericSend, cz as APIGetChallengeResponse, af as AccountStatus, ae as AccountType, a9 as AdminDevice, cF as CardanoBalances, cG as CardanoStakeInfo, aZ as CardanoVoteDelegationDrep, C as CliOptions, O as Connection, K as ConnectionEdge, c7 as CurrencyOrToken, c3 as DaemonAddress, co as DataTradelinkNetworkEntity, ct as DeploymentStep, cs as DeploymentStepID, bT as DeserializedManifest, z as DevicesPoolOptions, E as EntityType, bV as FeesLevel, a5 as GateAPIKey, bh as GateAPIKeyRequest, b7 as GateAPIV2UserAccessRequest, aF as GateAccountBitcoin, aL as GateAccountCardano, aw as GateAccountCommon, aG as GateAccountERC20, az as GateAccountEthereum, ax as GateAccountExchangeOptions, aN as GateAccountPolkadot, b0 as GateAccountRequest, aH as GateAccountRipple, aK as GateAccountSolana, aI as GateAccountStellar, aJ as GateAccountTezos, ay as GateAccountTradelinkData, aM as GateAccountTron, b2 as GateActivateRequest, a_ as GateAddress, b$ as GateCoinCapabilities, c0 as GateCurrency, a3 as GateDeviceType, ab as GateDigestGroup, bf as GateDigestsRequest, Q as GateEditWorkspaceRuleRequest, X as GateEntity, aS as GateExchange, bb as GateExchangeRequest, ac as GateFees, ad as GateFeesEIP1559, _ as GateForcedUnpledge, b5 as GateForcedUnpledgeRequest, a$ as GateGenericRequest, an as GateGovernanceRule, ao as GateGovernanceRulesSet, aa as GateGroup, be as GateGroupRequest, bd as GateGroupRequestTypeDefs, av as GateLabel, a8 as GateMessage, b9 as GateMessageRequest, bg as GateOrganizationRequest, Y as GatePledgeIncrement, b4 as GatePledgeIncrementRequest, aT as GatePolicy, bk as GatePolicyRequest, Z as GateRepledge, b3 as GateRepledgeRequest, S as GateRequest, V as GateRequestType, ai as GateRuleMultiAuth, ah as GateRuleMultiAuthStep, al as GateRuleSCI, aj as GateRuleThreshold, am as GateRuleTransactionFilter, ak as GateRuleWhitelist, a7 as GateSCIConfig, b8 as GateSCIConfigRequest, b1 as GateSPLTokenAccountRequest, a0 as GateTradelink, a2 as GateTradelinkAssetManager, aD as GateTradelinkAssetManagerRequest, aU as GateTradelinkEntity, a1 as GateTradelinkExchange, aC as GateTradelinkExchangeRequest, aV as GateTradelinkNetwork, aW as GateTradelinkOnboardingStatus, aB as GateTradelinkRequest, aA as GateTradelinkThirdParty, bc as GateTransactionRequest, aY as GateTransactionType, a6 as GateTransfer, bi as GateTransferRequest, a4 as GateUser, b6 as GateUserRequest, aX as GateVaultEntity, bj as GateVaultEntityRequest, aO as GateVaultEntityStatus, ba as GateWhitelistRequest, aP as GateWorkspacePermission, aR as GateWorkspaceRule, aQ as GateWorkspaceRuleStep, cy as GetU2FPubKeyInteraction, H as HelmValue, J as HelmValues, cq as HsmCertificate, cx as InteractionResponses, L as LamOptions, b_ as LegacyERC20Token, ck as MBRBakeTradelinkEntityWithAddresses, cc as MRBakeAccountParams, cf as MRBakeExchangeParams, cb as MRBakeGroupParams, cg as MRBakePolicyParams, cm as MRBakeTradelinkEntityOnboardingParams, cl as MRBakeTradelinkEntityParams, cn as MRBakeTradelinkNetworkParams, ch as MRBakeTradelinkOnboardingParams, cd as MRBakeVaultEntityParams, ce as MRBakeWhitelistParams, c9 as MRCreateAPIUserParams, ca as MRCreateAPIV2UserParams, c8 as MRCreateUserParams, ci as MREditQuorumParams, cj as MREditWorkspaceRuleParams, cv as MVInstanceDeployment, cu as MVInstanceDeploymentFF, cw as MVPod, bK as ManifestAPIUser, bE as ManifestAccountConfig, bD as ManifestAccountRule, bu as ManifestAccountRuleCardanoStaking, bz as ManifestAccountRuleCreateSplTokenAccount, bs as ManifestAccountRuleDeployContract, by as ManifestAccountRuleMessageSigning, bo as ManifestAccountRuleMultiAuth, bn as ManifestAccountRuleMultiAuthStep, br as ManifestAccountRulePolkadotStaking, bv as ManifestAccountRuleRawSigning, bp as ManifestAccountRuleSCI, bw as ManifestAccountRuleSend, bt as ManifestAccountRuleSolanaStaking, bx as ManifestAccountRuleStake, bq as ManifestAccountRuleTezosDelegation, bC as ManifestAccountRuleThreshold, bA as ManifestAccountRuleTransferSplToken, bB as ManifestAccountRuleWhitelist, bF as ManifestAccountTradelinkData, bS as ManifestContractApproval, bL as ManifestExchange, bM as ManifestPolicy, cp as ManifestRunner, bP as ManifestTradelink, bQ as ManifestTradelinkEntity, bR as ManifestTradelinkEntityWithAddresses, bJ as ManifestUser, bG as ManifestVaultEntity, bI as ManifestWhitelist, bH as ManifestWhitelistAddress, bO as ManifestWorkspaceRule, bN as ManifestWorkspaceRuleStep, bZ as MockNetworkResponse, bW as OnboardingContext, bX as OnboardingStep, bl as Organization, w as RawAccount, y as RawEntity, v as RawGroup, u as RawUser, x as RawWhiteList, bY as RecordLogger, aE as SPLToken, cr as SecureChannel, $ as TradelinkNetwork, ag as Unit, F as UserContextRunnable, bm as UserDevice, c5 as UserWithDevice, c6 as UserWithoutDevice, c4 as VaultEvent, c1 as WeirdGateERC20Token, at as WeirdGateGovernanceRule, au as WeirdGateGovernanceRulesSet, aq as WeirdGateRuleMultiAuth, ap as WeirdGateRuleMultiAuthStep, ar as WeirdGateRuleThreshold, as as WeirdGateRuleWhitelist, c2 as WeirdGateTokenCurrency, bU as feesLevels, s as performRequest, r as prepareRequest, t as recipeManifest } from './index-
|
|
1
|
+
import { N as Network, A as APIBearerTokenResponse, M as Manifest, D as DevicesPool, B as BakeManifestOptions, R as RunnableOptions, P as PoolOptions, a as ManifestAccount, G as GateAccount, b as ManifestAPIV2User, c as APIRequestResponse, d as DeployOptions, e as DestroyOptions, f as PsdModel, g as APIDevice, h as Device, I as Interactions, U as UserContext, i as GateTokenCurrency, j as MVInstance, k as ManifestTransaction, l as ManifestGroup, m as GateWhitelist, n as UTXOsPickingStrategy, o as GateTransaction, p as UpgradeOptions, W as WipeOptions, q as Interaction, T as TransportType } from './index-BpLhb-bQ.js';
|
|
2
|
+
export { cC as APIBitcoinLikeSend, cA as APICreateTransactionRequest, cE as APIEstimateFeesResponse, cD as APIEthereumLikeSend, cB as APIGenericSend, cz as APIGetChallengeResponse, af as AccountStatus, ae as AccountType, a9 as AdminDevice, cF as CardanoBalances, cG as CardanoStakeInfo, aZ as CardanoVoteDelegationDrep, C as CliOptions, O as Connection, K as ConnectionEdge, c7 as CurrencyOrToken, c3 as DaemonAddress, co as DataTradelinkNetworkEntity, ct as DeploymentStep, cs as DeploymentStepID, bT as DeserializedManifest, z as DevicesPoolOptions, E as EntityType, bV as FeesLevel, a5 as GateAPIKey, bh as GateAPIKeyRequest, b7 as GateAPIV2UserAccessRequest, aF as GateAccountBitcoin, aL as GateAccountCardano, aw as GateAccountCommon, aG as GateAccountERC20, az as GateAccountEthereum, ax as GateAccountExchangeOptions, aN as GateAccountPolkadot, b0 as GateAccountRequest, aH as GateAccountRipple, aK as GateAccountSolana, aI as GateAccountStellar, aJ as GateAccountTezos, ay as GateAccountTradelinkData, aM as GateAccountTron, b2 as GateActivateRequest, a_ as GateAddress, b$ as GateCoinCapabilities, c0 as GateCurrency, a3 as GateDeviceType, ab as GateDigestGroup, bf as GateDigestsRequest, Q as GateEditWorkspaceRuleRequest, X as GateEntity, aS as GateExchange, bb as GateExchangeRequest, ac as GateFees, ad as GateFeesEIP1559, _ as GateForcedUnpledge, b5 as GateForcedUnpledgeRequest, a$ as GateGenericRequest, an as GateGovernanceRule, ao as GateGovernanceRulesSet, aa as GateGroup, be as GateGroupRequest, bd as GateGroupRequestTypeDefs, av as GateLabel, a8 as GateMessage, b9 as GateMessageRequest, bg as GateOrganizationRequest, Y as GatePledgeIncrement, b4 as GatePledgeIncrementRequest, aT as GatePolicy, bk as GatePolicyRequest, Z as GateRepledge, b3 as GateRepledgeRequest, S as GateRequest, V as GateRequestType, ai as GateRuleMultiAuth, ah as GateRuleMultiAuthStep, al as GateRuleSCI, aj as GateRuleThreshold, am as GateRuleTransactionFilter, ak as GateRuleWhitelist, a7 as GateSCIConfig, b8 as GateSCIConfigRequest, b1 as GateSPLTokenAccountRequest, a0 as GateTradelink, a2 as GateTradelinkAssetManager, aD as GateTradelinkAssetManagerRequest, aU as GateTradelinkEntity, a1 as GateTradelinkExchange, aC as GateTradelinkExchangeRequest, aV as GateTradelinkNetwork, aW as GateTradelinkOnboardingStatus, aB as GateTradelinkRequest, aA as GateTradelinkThirdParty, bc as GateTransactionRequest, aY as GateTransactionType, a6 as GateTransfer, bi as GateTransferRequest, a4 as GateUser, b6 as GateUserRequest, aX as GateVaultEntity, bj as GateVaultEntityRequest, aO as GateVaultEntityStatus, ba as GateWhitelistRequest, aP as GateWorkspacePermission, aR as GateWorkspaceRule, aQ as GateWorkspaceRuleStep, cy as GetU2FPubKeyInteraction, H as HelmValue, J as HelmValues, cq as HsmCertificate, cx as InteractionResponses, L as LamOptions, b_ as LegacyERC20Token, ck as MBRBakeTradelinkEntityWithAddresses, cc as MRBakeAccountParams, cf as MRBakeExchangeParams, cb as MRBakeGroupParams, cg as MRBakePolicyParams, cm as MRBakeTradelinkEntityOnboardingParams, cl as MRBakeTradelinkEntityParams, cn as MRBakeTradelinkNetworkParams, ch as MRBakeTradelinkOnboardingParams, cd as MRBakeVaultEntityParams, ce as MRBakeWhitelistParams, c9 as MRCreateAPIUserParams, ca as MRCreateAPIV2UserParams, c8 as MRCreateUserParams, ci as MREditQuorumParams, cj as MREditWorkspaceRuleParams, cv as MVInstanceDeployment, cu as MVInstanceDeploymentFF, cw as MVPod, bK as ManifestAPIUser, bE as ManifestAccountConfig, bD as ManifestAccountRule, bu as ManifestAccountRuleCardanoStaking, bz as ManifestAccountRuleCreateSplTokenAccount, bs as ManifestAccountRuleDeployContract, by as ManifestAccountRuleMessageSigning, bo as ManifestAccountRuleMultiAuth, bn as ManifestAccountRuleMultiAuthStep, br as ManifestAccountRulePolkadotStaking, bv as ManifestAccountRuleRawSigning, bp as ManifestAccountRuleSCI, bw as ManifestAccountRuleSend, bt as ManifestAccountRuleSolanaStaking, bx as ManifestAccountRuleStake, bq as ManifestAccountRuleTezosDelegation, bC as ManifestAccountRuleThreshold, bA as ManifestAccountRuleTransferSplToken, bB as ManifestAccountRuleWhitelist, bF as ManifestAccountTradelinkData, bS as ManifestContractApproval, bL as ManifestExchange, bM as ManifestPolicy, cp as ManifestRunner, bP as ManifestTradelink, bQ as ManifestTradelinkEntity, bR as ManifestTradelinkEntityWithAddresses, bJ as ManifestUser, bG as ManifestVaultEntity, bI as ManifestWhitelist, bH as ManifestWhitelistAddress, bO as ManifestWorkspaceRule, bN as ManifestWorkspaceRuleStep, bZ as MockNetworkResponse, bW as OnboardingContext, bX as OnboardingStep, bl as Organization, w as RawAccount, y as RawEntity, v as RawGroup, u as RawUser, x as RawWhiteList, bY as RecordLogger, aE as SPLToken, cr as SecureChannel, $ as TradelinkNetwork, ag as Unit, F as UserContextRunnable, bm as UserDevice, c5 as UserWithDevice, c6 as UserWithoutDevice, c4 as VaultEvent, c1 as WeirdGateERC20Token, at as WeirdGateGovernanceRule, au as WeirdGateGovernanceRulesSet, aq as WeirdGateRuleMultiAuth, ap as WeirdGateRuleMultiAuthStep, ar as WeirdGateRuleThreshold, as as WeirdGateRuleWhitelist, c2 as WeirdGateTokenCurrency, bU as feesLevels, s as performRequest, r as prepareRequest, t as recipeManifest } from './index-BpLhb-bQ.js';
|
|
3
3
|
import { Agent } from 'https';
|
|
4
4
|
export { default as reviewAPIRequest } from './reviewAPIRequest.js';
|
|
5
5
|
export { ExtendedPubKey, LIGHT_EVM_CURRENCIES, deserializeUnitValue, extractSecureChannel, getAccountTypeByCurrency, getAccountUnit, getCurrencyOrToken, getCurrencyUnit, getDefaultUsername, getGateAccountUnit, getTokenUnit, getWorkspaceFromGate, queue, serializeUnitValue, unwrapConnection, wait, xpubToExtendedPubKey } from './utils.js';
|
package/lib/index.js
CHANGED
|
@@ -46,7 +46,7 @@ var _chunk3L2XDBZ2js = require('./chunk-3L2XDBZ2.js');
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunk65DEEXP4js = require('./chunk-65DEEXP4.js');
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
var _chunkPZ5AY32Cjs = require('./chunk-PZ5AY32C.js');
|
|
@@ -3248,5 +3248,5 @@ var wipeBackend_default = wipeBackend;
|
|
|
3248
3248
|
|
|
3249
3249
|
|
|
3250
3250
|
|
|
3251
|
-
exports.DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES = DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES; exports.DEFAULT_VAULT_REMOTE_URL = DEFAULT_VAULT_REMOTE_URL; exports.GateGroupRequestTypeDefs =
|
|
3251
|
+
exports.DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES = DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES; exports.DEFAULT_VAULT_REMOTE_URL = DEFAULT_VAULT_REMOTE_URL; exports.GateGroupRequestTypeDefs = _chunk65DEEXP4js.GateGroupRequestTypeDefs; exports.LIGHT_EVM_CURRENCIES = _chunkTLTMGY3Ejs.LIGHT_EVM_CURRENCIES; exports.bakeManifest = bakeManifest; exports.createAPIDevice = createAPIDevice_default; exports.createConfigCatEnvironment = createConfigCatEnvironment; exports.createDevicesPool = createDevicesPool_default; exports.createFaucet = createFaucet_default; exports.createInteractions = createInteractions; exports.createNetwork = _chunkO535UIILjs.createNetwork; exports.createPledge = createPledge_default; exports.createSettlement = createSettlement_default; exports.deleteConfigCatEnvironment = deleteConfigCatEnvironment; exports.deploy = deploy; exports.deserializeUnitValue = _chunkTLTMGY3Ejs.deserializeUnitValue; exports.destroy = destroy; exports.device = device_exports; exports.extractSecureChannel = _chunkTLTMGY3Ejs.extractSecureChannel; exports.feesLevels = _chunk65DEEXP4js.feesLevels; exports.fetchTokens = fetchTokens_default; exports.genSeed = genSeed_default; exports.getAccountTypeByCurrency = _chunkTLTMGY3Ejs.getAccountTypeByCurrency; exports.getAccountUnit = _chunkTLTMGY3Ejs.getAccountUnit; exports.getAuthTokens = _chunk33OZ4G5Pjs.getAuthTokens; exports.getCryptoCurrencyById = _chunkTLTMGY3Ejs.getCryptoCurrencyById; exports.getCurrencyOrToken = _chunkTLTMGY3Ejs.getCurrencyOrToken; exports.getCurrencyUnit = _chunkTLTMGY3Ejs.getCurrencyUnit; exports.getDefaultUsername = _chunkTLTMGY3Ejs.getDefaultUsername; exports.getGateAccountUnit = _chunkTLTMGY3Ejs.getGateAccountUnit; exports.getMVInstances = getMVInstances; exports.getTokenUnit = _chunkTLTMGY3Ejs.getTokenUnit; exports.getWorkspaceFromGate = _chunkTLTMGY3Ejs.getWorkspaceFromGate; exports.listCryptoCurrencies = _chunkTLTMGY3Ejs.listCryptoCurrencies; exports.performRequest = _chunk33OZ4G5Pjs.performRequest; exports.prepareRequest = _chunk33OZ4G5Pjs.prepareRequest_default; exports.queue = _chunkTLTMGY3Ejs.queue; exports.recipeManifest = _chunkODU2VY2Ujs.recipeManifest; exports.reviewAPIRequest = _chunk33OZ4G5Pjs.reviewAPIRequest_default; exports.send = send_default; exports.serializeUnitValue = _chunkTLTMGY3Ejs.serializeUnitValue; exports.setConfigCatFeatureFlagValues = setConfigCatFeatureFlagValues; exports.setDeviceAPIEndpoint = setDeviceAPIEndpoint; exports.unwrapConnection = _chunkTLTMGY3Ejs.unwrapConnection; exports.upgrade = upgrade; exports.validateManifest = validateManifest; exports.vaultCoins = _chunkTLTMGY3Ejs.vaultCoins; exports.wait = _chunkTLTMGY3Ejs.wait; exports.wipeBackend = wipeBackend_default; exports.xpubToExtendedPubKey = _chunkTLTMGY3Ejs.xpubToExtendedPubKey;
|
|
3252
3252
|
//# sourceMappingURL=index.js.map
|
package/lib/recipeManifest.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { cK as GateAccountsByName, cM as GateExchangesByName, cI as GateGroupsByName, cN as GatePoliciesByName, cT as GateTradelinkAssetManagerByName, cO as GateTradelinkCustodianByName, cQ as GateTradelinkExchangeByName, cS as GateTradelinkHSMAssetManagerByName, cP as GateTradelinkHSMCustodianByName, cR as GateTradelinkHSMExchangeByName, cL as GateVaultEntitiesByName, cJ as GateWhitelistsByName, cW as RecipeManifestOptions, cV as RecipeManifestResult, cU as RecipeRawData, t as default, cH as getDeviceIndex } from './index-
|
|
1
|
+
export { cK as GateAccountsByName, cM as GateExchangesByName, cI as GateGroupsByName, cN as GatePoliciesByName, cT as GateTradelinkAssetManagerByName, cO as GateTradelinkCustodianByName, cQ as GateTradelinkExchangeByName, cS as GateTradelinkHSMAssetManagerByName, cP as GateTradelinkHSMCustodianByName, cR as GateTradelinkHSMExchangeByName, cL as GateVaultEntitiesByName, cJ as GateWhitelistsByName, cW as RecipeManifestOptions, cV as RecipeManifestResult, cU as RecipeRawData, t as default, cH as getDeviceIndex } from './index-BpLhb-bQ.js';
|
|
2
2
|
import '@ledgerhq/hw-transport-mocker';
|
|
3
3
|
import '@ledgerhq/types-cryptoassets';
|
|
4
4
|
import '@ledgerhq/vault-utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DevicesPool, b as ManifestAPIV2User, R as RunnableOptions, c as APIRequestResponse } from './index-
|
|
1
|
+
import { D as DevicesPool, b as ManifestAPIV2User, R as RunnableOptions, c as APIRequestResponse } from './index-BpLhb-bQ.js';
|
|
2
2
|
import '@ledgerhq/hw-transport-mocker';
|
|
3
3
|
import '@ledgerhq/types-cryptoassets';
|
|
4
4
|
import '@ledgerhq/vault-utils';
|
package/lib/types/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { CryptoCurrency, TokenCurrency } from '@ledgerhq/types-cryptoassets';
|
|
|
3
3
|
import '@ledgerhq/vault-utils';
|
|
4
4
|
import 'bignumber.js';
|
|
5
5
|
import 'socket.io-client';
|
|
6
|
-
export { A as APIBearerTokenResponse, cC as APIBitcoinLikeSend, cA as APICreateTransactionRequest, cE as APIEstimateFeesResponse, cD as APIEthereumLikeSend, cB as APIGenericSend, cz as APIGetChallengeResponse, c as APIRequestResponse, af as AccountStatus, ae as AccountType, a9 as AdminDevice, B as BakeManifestOptions, cF as CardanoBalances, cG as CardanoStakeInfo, aZ as CardanoVoteDelegationDrep, C as CliOptions, O as Connection, K as ConnectionEdge, c7 as CurrencyOrToken, c3 as DaemonAddress, co as DataTradelinkNetworkEntity, d as DeployOptions, ct as DeploymentStep, cs as DeploymentStepID, bT as DeserializedManifest, e as DestroyOptions, D as DevicesPool, z as DevicesPoolOptions, E as EntityType, bV as FeesLevel, a5 as GateAPIKey, bh as GateAPIKeyRequest, b7 as GateAPIV2UserAccessRequest, G as GateAccount, aF as GateAccountBitcoin, aL as GateAccountCardano, aw as GateAccountCommon, aG as GateAccountERC20, az as GateAccountEthereum, ax as GateAccountExchangeOptions, aN as GateAccountPolkadot, b0 as GateAccountRequest, aH as GateAccountRipple, aK as GateAccountSolana, aI as GateAccountStellar, aJ as GateAccountTezos, ay as GateAccountTradelinkData, aM as GateAccountTron, b2 as GateActivateRequest, a_ as GateAddress, b$ as GateCoinCapabilities, c0 as GateCurrency, a3 as GateDeviceType, ab as GateDigestGroup, bf as GateDigestsRequest, Q as GateEditWorkspaceRuleRequest, X as GateEntity, aS as GateExchange, bb as GateExchangeRequest, ac as GateFees, ad as GateFeesEIP1559, _ as GateForcedUnpledge, b5 as GateForcedUnpledgeRequest, a$ as GateGenericRequest, an as GateGovernanceRule, ao as GateGovernanceRulesSet, aa as GateGroup, be as GateGroupRequest, bd as GateGroupRequestTypeDefs, av as GateLabel, a8 as GateMessage, b9 as GateMessageRequest, bg as GateOrganizationRequest, Y as GatePledgeIncrement, b4 as GatePledgeIncrementRequest, aT as GatePolicy, bk as GatePolicyRequest, Z as GateRepledge, b3 as GateRepledgeRequest, S as GateRequest, V as GateRequestType, ai as GateRuleMultiAuth, ah as GateRuleMultiAuthStep, al as GateRuleSCI, aj as GateRuleThreshold, am as GateRuleTransactionFilter, ak as GateRuleWhitelist, a7 as GateSCIConfig, b8 as GateSCIConfigRequest, b1 as GateSPLTokenAccountRequest, i as GateTokenCurrency, a0 as GateTradelink, a2 as GateTradelinkAssetManager, aD as GateTradelinkAssetManagerRequest, aU as GateTradelinkEntity, a1 as GateTradelinkExchange, aC as GateTradelinkExchangeRequest, aV as GateTradelinkNetwork, aW as GateTradelinkOnboardingStatus, aB as GateTradelinkRequest, aA as GateTradelinkThirdParty, o as GateTransaction, bc as GateTransactionRequest, aY as GateTransactionType, a6 as GateTransfer, bi as GateTransferRequest, a4 as GateUser, b6 as GateUserRequest, aX as GateVaultEntity, bj as GateVaultEntityRequest, aO as GateVaultEntityStatus, m as GateWhitelist, ba as GateWhitelistRequest, aP as GateWorkspacePermission, aR as GateWorkspaceRule, aQ as GateWorkspaceRuleStep, cy as GetU2FPubKeyInteraction, H as HelmValue, J as HelmValues, cq as HsmCertificate, q as Interaction, cx as InteractionResponses, I as Interactions, L as LamOptions, b_ as LegacyERC20Token, ck as MBRBakeTradelinkEntityWithAddresses, cc as MRBakeAccountParams, cf as MRBakeExchangeParams, cb as MRBakeGroupParams, cg as MRBakePolicyParams, cm as MRBakeTradelinkEntityOnboardingParams, cl as MRBakeTradelinkEntityParams, cn as MRBakeTradelinkNetworkParams, ch as MRBakeTradelinkOnboardingParams, cd as MRBakeVaultEntityParams, ce as MRBakeWhitelistParams, c9 as MRCreateAPIUserParams, ca as MRCreateAPIV2UserParams, c8 as MRCreateUserParams, ci as MREditQuorumParams, cj as MREditWorkspaceRuleParams, j as MVInstance, cv as MVInstanceDeployment, cu as MVInstanceDeploymentFF, cw as MVPod, M as Manifest, bK as ManifestAPIUser, b as ManifestAPIV2User, a as ManifestAccount, bE as ManifestAccountConfig, bD as ManifestAccountRule, bu as ManifestAccountRuleCardanoStaking, bz as ManifestAccountRuleCreateSplTokenAccount, bs as ManifestAccountRuleDeployContract, by as ManifestAccountRuleMessageSigning, bo as ManifestAccountRuleMultiAuth, bn as ManifestAccountRuleMultiAuthStep, br as ManifestAccountRulePolkadotStaking, bv as ManifestAccountRuleRawSigning, bp as ManifestAccountRuleSCI, bw as ManifestAccountRuleSend, bt as ManifestAccountRuleSolanaStaking, bx as ManifestAccountRuleStake, bq as ManifestAccountRuleTezosDelegation, bC as ManifestAccountRuleThreshold, bA as ManifestAccountRuleTransferSplToken, bB as ManifestAccountRuleWhitelist, bF as ManifestAccountTradelinkData, bS as ManifestContractApproval, bL as ManifestExchange, l as ManifestGroup, bM as ManifestPolicy, cp as ManifestRunner, bP as ManifestTradelink, bQ as ManifestTradelinkEntity, bR as ManifestTradelinkEntityWithAddresses, k as ManifestTransaction, bJ as ManifestUser, bG as ManifestVaultEntity, bI as ManifestWhitelist, bH as ManifestWhitelistAddress, bO as ManifestWorkspaceRule, bN as ManifestWorkspaceRuleStep, bZ as MockNetworkResponse, N as Network, bW as OnboardingContext, bX as OnboardingStep, bl as Organization, P as PoolOptions, f as PsdModel, w as RawAccount, y as RawEntity, v as RawGroup, u as RawUser, x as RawWhiteList, bY as RecordLogger, R as RunnableOptions, aE as SPLToken, cr as SecureChannel, $ as TradelinkNetwork, T as TransportType, n as UTXOsPickingStrategy, ag as Unit, p as UpgradeOptions, U as UserContext, F as UserContextRunnable, bm as UserDevice, c5 as UserWithDevice, c6 as UserWithoutDevice, c4 as VaultEvent, c1 as WeirdGateERC20Token, at as WeirdGateGovernanceRule, au as WeirdGateGovernanceRulesSet, aq as WeirdGateRuleMultiAuth, ap as WeirdGateRuleMultiAuthStep, ar as WeirdGateRuleThreshold, as as WeirdGateRuleWhitelist, c2 as WeirdGateTokenCurrency, W as WipeOptions, bU as feesLevels } from '../index-
|
|
6
|
+
export { A as APIBearerTokenResponse, cC as APIBitcoinLikeSend, cA as APICreateTransactionRequest, cE as APIEstimateFeesResponse, cD as APIEthereumLikeSend, cB as APIGenericSend, cz as APIGetChallengeResponse, c as APIRequestResponse, af as AccountStatus, ae as AccountType, a9 as AdminDevice, B as BakeManifestOptions, cF as CardanoBalances, cG as CardanoStakeInfo, aZ as CardanoVoteDelegationDrep, C as CliOptions, O as Connection, K as ConnectionEdge, c7 as CurrencyOrToken, c3 as DaemonAddress, co as DataTradelinkNetworkEntity, d as DeployOptions, ct as DeploymentStep, cs as DeploymentStepID, bT as DeserializedManifest, e as DestroyOptions, D as DevicesPool, z as DevicesPoolOptions, E as EntityType, bV as FeesLevel, a5 as GateAPIKey, bh as GateAPIKeyRequest, b7 as GateAPIV2UserAccessRequest, G as GateAccount, aF as GateAccountBitcoin, aL as GateAccountCardano, aw as GateAccountCommon, aG as GateAccountERC20, az as GateAccountEthereum, ax as GateAccountExchangeOptions, aN as GateAccountPolkadot, b0 as GateAccountRequest, aH as GateAccountRipple, aK as GateAccountSolana, aI as GateAccountStellar, aJ as GateAccountTezos, ay as GateAccountTradelinkData, aM as GateAccountTron, b2 as GateActivateRequest, a_ as GateAddress, b$ as GateCoinCapabilities, c0 as GateCurrency, a3 as GateDeviceType, ab as GateDigestGroup, bf as GateDigestsRequest, Q as GateEditWorkspaceRuleRequest, X as GateEntity, aS as GateExchange, bb as GateExchangeRequest, ac as GateFees, ad as GateFeesEIP1559, _ as GateForcedUnpledge, b5 as GateForcedUnpledgeRequest, a$ as GateGenericRequest, an as GateGovernanceRule, ao as GateGovernanceRulesSet, aa as GateGroup, be as GateGroupRequest, bd as GateGroupRequestTypeDefs, av as GateLabel, a8 as GateMessage, b9 as GateMessageRequest, bg as GateOrganizationRequest, Y as GatePledgeIncrement, b4 as GatePledgeIncrementRequest, aT as GatePolicy, bk as GatePolicyRequest, Z as GateRepledge, b3 as GateRepledgeRequest, S as GateRequest, V as GateRequestType, ai as GateRuleMultiAuth, ah as GateRuleMultiAuthStep, al as GateRuleSCI, aj as GateRuleThreshold, am as GateRuleTransactionFilter, ak as GateRuleWhitelist, a7 as GateSCIConfig, b8 as GateSCIConfigRequest, b1 as GateSPLTokenAccountRequest, i as GateTokenCurrency, a0 as GateTradelink, a2 as GateTradelinkAssetManager, aD as GateTradelinkAssetManagerRequest, aU as GateTradelinkEntity, a1 as GateTradelinkExchange, aC as GateTradelinkExchangeRequest, aV as GateTradelinkNetwork, aW as GateTradelinkOnboardingStatus, aB as GateTradelinkRequest, aA as GateTradelinkThirdParty, o as GateTransaction, bc as GateTransactionRequest, aY as GateTransactionType, a6 as GateTransfer, bi as GateTransferRequest, a4 as GateUser, b6 as GateUserRequest, aX as GateVaultEntity, bj as GateVaultEntityRequest, aO as GateVaultEntityStatus, m as GateWhitelist, ba as GateWhitelistRequest, aP as GateWorkspacePermission, aR as GateWorkspaceRule, aQ as GateWorkspaceRuleStep, cy as GetU2FPubKeyInteraction, H as HelmValue, J as HelmValues, cq as HsmCertificate, q as Interaction, cx as InteractionResponses, I as Interactions, L as LamOptions, b_ as LegacyERC20Token, ck as MBRBakeTradelinkEntityWithAddresses, cc as MRBakeAccountParams, cf as MRBakeExchangeParams, cb as MRBakeGroupParams, cg as MRBakePolicyParams, cm as MRBakeTradelinkEntityOnboardingParams, cl as MRBakeTradelinkEntityParams, cn as MRBakeTradelinkNetworkParams, ch as MRBakeTradelinkOnboardingParams, cd as MRBakeVaultEntityParams, ce as MRBakeWhitelistParams, c9 as MRCreateAPIUserParams, ca as MRCreateAPIV2UserParams, c8 as MRCreateUserParams, ci as MREditQuorumParams, cj as MREditWorkspaceRuleParams, j as MVInstance, cv as MVInstanceDeployment, cu as MVInstanceDeploymentFF, cw as MVPod, M as Manifest, bK as ManifestAPIUser, b as ManifestAPIV2User, a as ManifestAccount, bE as ManifestAccountConfig, bD as ManifestAccountRule, bu as ManifestAccountRuleCardanoStaking, bz as ManifestAccountRuleCreateSplTokenAccount, bs as ManifestAccountRuleDeployContract, by as ManifestAccountRuleMessageSigning, bo as ManifestAccountRuleMultiAuth, bn as ManifestAccountRuleMultiAuthStep, br as ManifestAccountRulePolkadotStaking, bv as ManifestAccountRuleRawSigning, bp as ManifestAccountRuleSCI, bw as ManifestAccountRuleSend, bt as ManifestAccountRuleSolanaStaking, bx as ManifestAccountRuleStake, bq as ManifestAccountRuleTezosDelegation, bC as ManifestAccountRuleThreshold, bA as ManifestAccountRuleTransferSplToken, bB as ManifestAccountRuleWhitelist, bF as ManifestAccountTradelinkData, bS as ManifestContractApproval, bL as ManifestExchange, l as ManifestGroup, bM as ManifestPolicy, cp as ManifestRunner, bP as ManifestTradelink, bQ as ManifestTradelinkEntity, bR as ManifestTradelinkEntityWithAddresses, k as ManifestTransaction, bJ as ManifestUser, bG as ManifestVaultEntity, bI as ManifestWhitelist, bH as ManifestWhitelistAddress, bO as ManifestWorkspaceRule, bN as ManifestWorkspaceRuleStep, bZ as MockNetworkResponse, N as Network, bW as OnboardingContext, bX as OnboardingStep, bl as Organization, P as PoolOptions, f as PsdModel, w as RawAccount, y as RawEntity, v as RawGroup, u as RawUser, x as RawWhiteList, bY as RecordLogger, R as RunnableOptions, aE as SPLToken, cr as SecureChannel, $ as TradelinkNetwork, T as TransportType, n as UTXOsPickingStrategy, ag as Unit, p as UpgradeOptions, U as UserContext, F as UserContextRunnable, bm as UserDevice, c5 as UserWithDevice, c6 as UserWithoutDevice, c4 as VaultEvent, c1 as WeirdGateERC20Token, at as WeirdGateGovernanceRule, au as WeirdGateGovernanceRulesSet, aq as WeirdGateRuleMultiAuth, ap as WeirdGateRuleMultiAuthStep, ar as WeirdGateRuleThreshold, as as WeirdGateRuleWhitelist, c2 as WeirdGateTokenCurrency, W as WipeOptions, bU as feesLevels } from '../index-BpLhb-bQ.js';
|
package/lib/types/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk65DEEXP4js = require('../chunk-65DEEXP4.js');
|
|
5
5
|
require('../chunk-PZ5AY32C.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.GateGroupRequestTypeDefs =
|
|
9
|
+
exports.GateGroupRequestTypeDefs = _chunk65DEEXP4js.GateGroupRequestTypeDefs; exports.feesLevels = _chunk65DEEXP4js.feesLevels;
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ag as Unit, a as ManifestAccount, i as GateTokenCurrency, G as GateAccount, ae as AccountType, c7 as CurrencyOrToken, O as Connection, cr as SecureChannel } from './index-
|
|
1
|
+
import { ag as Unit, a as ManifestAccount, i as GateTokenCurrency, G as GateAccount, ae as AccountType, c7 as CurrencyOrToken, O as Connection, cr as SecureChannel } from './index-BpLhb-bQ.js';
|
|
2
2
|
import '@ledgerhq/hw-transport-mocker';
|
|
3
3
|
import '@ledgerhq/types-cryptoassets';
|
|
4
4
|
import '@ledgerhq/vault-utils';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-GAKIXPAF.js","../src/types/index.ts"],"names":[],"mappings":"AAAA;AC2nCO,IAAM,yBAAA,EAA2B;AAAA,EACtC,cAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAqVO,IAAM,WAAA,EAAa,CAAC,MAAA,EAAQ,QAAA,EAAU,MAAA,EAAQ,QAAQ,CAAA;AD78C7D;AACA;AACE;AACA;AACF,6FAAC","file":"/home/runner/work/vault-ts/vault-ts/packages/common/lib/chunk-GAKIXPAF.js","sourcesContent":[null,"import { RecordStore } from \"@ledgerhq/hw-transport-mocker\";\nimport { CryptoCurrency, TokenCurrency } from \"@ledgerhq/types-cryptoassets\";\nimport { Logger } from \"@ledgerhq/vault-utils\";\nimport { BigNumber } from \"bignumber.js\";\nimport { Socket } from \"socket.io-client\";\n\nimport { Device } from \"../device/types\";\nimport {\n DataAccount,\n DataExchange,\n DataGroup,\n DataPolicy,\n DataVaultEntity,\n DataWhitelist,\n} from \"../prepareRequest\";\nimport { RecipeManifestResult } from \"../recipeManifest\";\nimport { CardanoBalances } from \"./cardano\";\nimport { PolkadotAccountData } from \"./polkadot\";\n\nexport * from \"./cardano\";\n\nexport type UserContext = {\n network: Network;\n getToken: () => string | null;\n run: (interactions: Interaction<any>[], data: any) => Promise<any>;\n get: <T>(url: string, requestOptions?: any) => Promise<T>;\n post: <T>(url: string, payload: any) => Promise<T>;\n approveRequest: (payload: any) => Promise<any>;\n approveRequestWithoutHSM: (payload: any) => Promise<any>;\n rejectRequest: (requestID: number) => Promise<any>;\n connectSocket: () => Promise<typeof Socket>;\n onEvent: (cb: (event: VaultEvent) => void) => void;\n};\n\nexport type RawUser = {\n entityType: \"USER\";\n name: string;\n role: \"admin\" | \"operator\";\n device: number;\n};\n\nexport type RawGroup = {\n entityType: \"GROUP\";\n name: string;\n users: number[];\n description?: string;\n};\n\nexport type RawAccount = {\n entityType: \"ACCOUNT\";\n name: string;\n currency: string;\n derivationMode?: string;\n};\n\nexport type RawWhiteList = {\n entityType: \"WHITELIST\";\n name: string;\n description?: string;\n addresses: string[];\n};\n\nexport type RawEntity = RawUser | RawAccount | RawGroup | RawWhiteList;\n\nexport type EntityType =\n | \"USER\"\n | \"GROUP\"\n | \"ACCOUNT\"\n | \"WHITELIST\"\n | \"TRANSACTION\"\n | \"EXCHANGE\"\n | \"POLICY\"\n | \"VAULT_ENTITY\";\n\nexport type TransportType = \"software\" | \"speculos-web\" | \"nodehid\" | \"nodehid-replayer\";\n\nexport type DevicesPoolOptions = {\n salt?: string;\n gate: string;\n apiGateway?: string;\n overrideSeeds?: string[];\n deviceAPIURL?: string;\n notifierURL?: string;\n readOnlyUser?: string;\n transport?: TransportType;\n recordStore?: RecordStore | null;\n psdModel?: PsdModel;\n\n // see VFE-1010\n deviceAPISessionID?: string;\n};\n\nexport type LamOptions = {\n lamURL?: string;\n lamAPIKey?: string;\n};\n\nexport type CliOptions = {\n networkDelay?: number;\n};\n\nexport type PoolOptions = DevicesPoolOptions & LamOptions & CliOptions;\n\nexport type UserContextRunnable = (context: UserContext) => any;\n\nexport type DeployOptions = {\n // vault-remote URL\n remoteURL?: string;\n // name of the instance, will be used for namespace creation & domain registration\n name: string;\n // who is deploying\n owner: string;\n // default is `main`\n preset?: string;\n // expiration date\n expireOn?: Date;\n // arbitrary helm values to pass\n values?: HelmValues;\n // elapsed minutes before deploy throw an error\n watchTimeoutMinutes?: number;\n // spawn a dedicated HSM simu\n useDedicatedHSMSimu?: boolean;\n // use HTTP polling instead of socket to check instance status\n useHTTPPolling?: boolean;\n};\n\nexport type UpgradeOptions = {\n // vault-remote URL\n remoteURL?: string;\n // name of the instance to target\n name: string;\n // will upgrade to values defined in the preset\n preset?: string;\n // arbitrary helm values to pass\n values?: HelmValues;\n // elapsed minutes before deploy throw an error\n watchTimeoutMinutes?: number;\n};\n\nexport type DestroyOptions = {\n // vault-remote URL\n remoteURL?: string;\n // name of the instance\n name: string;\n // wether we should wait for instance to completely disappear\n wait?: boolean;\n};\n\nexport type HelmValue =\n | string\n | number\n | boolean\n | undefined\n | null\n | Array<HelmValue>\n | HelmValues;\n\nexport interface HelmValues {\n [x: string]: HelmValue;\n}\n\nexport type DevicesPool = {\n getRevaultCompatOptions: () => {\n workspace: string;\n deviceApiUrl: string;\n salt: string;\n };\n workspace: string;\n gate: string;\n apiGateway: string | undefined;\n network: Network;\n psdModel: PsdModel;\n login: (deviceIndex: number | string) => Promise<UserContext>;\n getUserID: (deviceIndex: number) => Promise<string>;\n bruteforceDeviceIndex: (userID: string) => Promise<number>;\n setSalt: (salt: string) => void;\n registerDevice: (deviceIndex: number, request: any) => Promise<any>;\n lamAPI: {\n createInvitation: (invitationID: string) => Promise<{ device_id: string }>;\n registerUser: (name: string, uuid: string) => Promise<void>;\n };\n runWithDevice: (deviceIndex: number, interactions: Interaction<any>[], data: any) => Promise<any>;\n runWithQuorum: (iteratee: UserContextRunnable) => Promise<any>;\n device: Device;\n interactions: Interactions;\n getOnboardingAdminDevices: () => Promise<AdminDevice[]>;\n};\n\nexport type ConnectionEdge<T> = {\n cursor: number;\n node: T;\n};\n\nexport type Connection<T> = {\n edges: ConnectionEdge<T>[];\n pageInfo: {\n hasNextPage: boolean;\n count: number;\n };\n};\n\ntype GateEntityWithRequest = Extract<GateEntity, { last_request?: any }>;\n\nexport interface GateEditWorkspaceRuleRequest extends GateGenericRequest {\n type: \"EDIT_WORKSPACE_RULE\";\n target_type: \"WORKSPACE_RULE\";\n workspace_rule: GateWorkspaceRule;\n request_data: {\n steps: GateWorkspaceRuleStep[];\n };\n}\n\nexport type GateRequest =\n | NonNullable<GateEntityWithRequest[\"last_request\"]>\n | GateAPIV2UserAccessRequest\n | GateEditWorkspaceRuleRequest\n | GateOrganizationRequest\n | GateActivateRequest;\n\nexport type GateRequestType = GateRequest[\"type\"];\n\nexport type GateEntity =\n | GateAPIKey\n | GateAccount\n | GateExchange\n | GateExchange\n | GateGroup\n | GateMessage\n | GatePolicy\n | GateSCIConfig\n | GateTransaction\n | GateUser\n | GateVaultEntity\n | GateWhitelist\n | GatePledgeIncrement\n | GateWorkspaceRule\n | GateRepledge\n | GateForcedUnpledge\n | GateDigestGroup\n | GateTransfer\n | GateTradelink\n | GateTradelinkExchange\n | GateTradelinkAssetManager;\n\nexport type GatePledgeIncrement = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\";\n account_id: number;\n data: {\n amount: string;\n };\n last_request?: GatePledgeIncrementRequest;\n};\nexport type GateRepledge = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\";\n account_id: number;\n data: {\n pledge_id: number;\n settlement_id: string;\n account_name: string;\n exchange_name: string;\n amount: string;\n currency: string;\n };\n last_request?: GateRepledgeRequest;\n};\n\nexport type GateForcedUnpledge = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\";\n account_id: number;\n data: {\n pledge_id: number;\n account_name: string;\n currency: string;\n exchange_name: string;\n };\n pledge_id: string;\n last_request?: GateForcedUnpledgeRequest;\n};\n\nexport type TradelinkNetwork = {\n id: string;\n custodian: GateTradelinkThirdParty<\"CUSTODIAN\">;\n asset_managers: GateTradelinkThirdParty<\"ASSET_MANAGER\">[];\n exchanges: GateTradelinkThirdParty<\"EXCHANGE\">[];\n};\nexport type GateTradelink = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\" | \"ACTIVE\" | \"ABORTED\";\n hsm_groups: {\n arbitration_groups: GateGroup[];\n settlement_groups: GateGroup[];\n withdraw_groups: GateGroup[];\n };\n network: TradelinkNetwork;\n\n last_request?: GateTradelinkRequest;\n};\n\ntype TradelinkInternalGroup = {\n quorum: number;\n users: Array<{ id: number; pub_key: string; username: string }>;\n};\ntype TradelinkInternalWhitelist = {\n id: number;\n addresses: Array<Omit<GateAddress, \"id\">>;\n};\n\nexport type GateTradelinkExchange = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\" | \"ACTIVE\" | \"ABORTED\";\n last_request?: GateTradelinkExchangeRequest;\n is_under_edit: boolean;\n network: TradelinkNetwork;\n network_data: TradelinkNetwork[\"exchanges\"][number];\n front_data: {\n pledge_approval_group: TradelinkInternalGroup;\n settlement_creator_group: TradelinkInternalGroup;\n whitelist: TradelinkInternalWhitelist;\n };\n hsm_data: {\n name: string;\n pledge_approval_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n settlement_creator_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n };\n};\n\nexport type GateTradelinkAssetManager = {\n id: number;\n status: \"PENDING\" | \"SUBMITTED\" | \"ACTIVE\" | \"ABORTED\";\n last_request?: GateTradelinkAssetManagerRequest;\n is_under_edit: boolean;\n network: TradelinkNetwork;\n network_data: TradelinkNetwork[\"asset_managers\"][number];\n front_data: {\n pledge_creator_group: TradelinkInternalGroup;\n settlement_approval_group: TradelinkInternalGroup;\n whitelist: TradelinkInternalWhitelist;\n };\n hsm_data: {\n name: string;\n pledge_creator_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n settlement_approval_group: {\n id: number;\n quorum: number;\n users: string[]; // array of public keys\n };\n };\n};\n\nexport type GateDeviceType = \"API\" | \"PSD\" | \"SOFT_PSD\";\n\nexport type GateUser = {\n id: number;\n entityType: \"USER\";\n is_api?: boolean;\n view_all_override?: boolean;\n pub_key: string;\n username: string;\n user_id: string;\n picture?: string;\n created_on: string;\n status: string;\n email?: string;\n role: \"ADMIN\" | \"OPERATOR\";\n last_request?: GateUserRequest;\n device_type: GateDeviceType;\n app_version?: string;\n};\n\nexport type GateAPIKey = {\n id: number;\n secret?: string;\n entityType: \"VAULT_API_KEY\";\n name: string;\n created_on: string;\n updated_on: string;\n status:\n | \"PENDING_APPROVAL\"\n | \"APPROVED\"\n | \"ACTIVE\"\n | \"SUSPENDED\"\n | \"PENDING_REVOCATION\"\n | \"REVOKED\"\n | \"ABORTED\";\n entities: GateVaultEntity[];\n scopes: Record<string, any>;\n identifier: string;\n last_request?: GateAPIKeyRequest;\n};\n\nexport type GateTransfer = {\n id: number;\n amount: string;\n network: string | null;\n recipient: string;\n status: \"PENDING\" | \"APPROVED\" | \"SUBMITTED\" | \"ABORTED\";\n last_request: GateTransferRequest;\n};\n\nexport type GateSCIConfig = {\n id: number;\n entityType: \"SCI_CONFIG\";\n account: Omit<GateAccount, \"sci_config\">;\n sciconfig: {\n dapps: string[];\n custom_contract_call_enabled: boolean;\n };\n status: \"PENDING\" | \"ACTIVE\";\n last_request?: GateSCIConfigRequest;\n};\n\ntype MessageType = \"EIP191\" | \"EIP712\";\n\nexport type GateMessage = {\n account_id: number;\n data: string | Record<string, any>;\n id: number;\n message_type: MessageType;\n signature: string | null;\n der_signature: string | null;\n status: \"PENDING_APPROVAL\" | \"APPROVED\" | \"SIGNED\" | \"ABORTED\";\n type: \"MESSAGE_SIGNING_ALLOWED\";\n entityType: \"MESSAGE_SIGNING\";\n created_on?: string;\n notes: GateTransactionNote[];\n last_request?: GateMessageRequest;\n};\n\nexport type AdminDevice = [username: string, index: number];\n\nexport type GateGroup = {\n id: number;\n name: string;\n entityType: \"GROUP\";\n created_on: string;\n created_by: GateUser;\n description?: string;\n status: \"ACTIVE\" | \"PENDING\" | \"REVOKED\" | \"ABORTED\" | \"TO_MIGRATE\";\n is_internal: boolean;\n members: GateUser[];\n is_under_edit: boolean;\n last_request?: GateGroupRequest;\n is_tradelink?: boolean;\n};\n\ntype GateDigestSignature = {\n der: string;\n r: number;\n s: number;\n v: number | null;\n pub_key: string;\n};\n\ntype GateDigest = {\n digest: string;\n derivation_path: string;\n signature?: GateDigestSignature;\n index?: number;\n};\n\nexport type GateDigestGroup = {\n id: number;\n last_request?: GateDigestsRequest;\n account_id: number;\n created_by: GateUser;\n created_on: string;\n digests_data: GateDigest[];\n // todo check final status with gate\n status: \"PENDING_APPROVAL\" | \"APPROVED\";\n};\n\nexport type UTXOsPickingStrategy = \"MERGE_OUTPUTS\" | \"DEEP_OUTPUTS_FIRST\" | \"OPTIMIZE_SIZE\";\n\nexport type GateFees = {\n gas_price: string;\n gas_limit: string;\n fees_per_byte: string;\n fees: string;\n utxo_picking_strategy?: UTXOsPickingStrategy;\n storage_limit?: number;\n};\n\nexport type GateFeesEIP1559 = {\n base_fees: string;\n gas_limit: string;\n max_fees: string;\n max_fees_buffer_factor: string;\n priority_fees: string;\n};\n\nexport type AccountType =\n | \"Ethereum\"\n | \"Bitcoin\"\n | \"Erc20\"\n | \"Bep20\"\n | \"Ripple\"\n | \"Stellar\"\n | \"Tezos\"\n | \"Solana\"\n | \"Cardano\"\n | \"Polkadot\"\n | \"Tron\";\n\nexport type AccountStatus =\n | \"PENDING_CREATE_IN_HSM\"\n | \"PENDING\"\n | \"APPROVED\"\n | \"PENDING_VIEW_ONLY\"\n | \"ACTIVE\"\n | \"VIEW_ONLY\"\n | \"PENDING_ACTIVATION\"\n | \"ABORTED\"\n | \"ACTIVATION_ABORTED\";\n\nexport type Unit = {\n name: string;\n code: string;\n magnitude: number;\n};\n\ntype AccountSettings = {\n id: number;\n fiat: string;\n currency_unit: Unit;\n unitIndex: number;\n blockchain_explorer: string;\n};\n\nexport type GateRuleMultiAuthStep = { quorum: number; group: GateGroup };\n\nexport type GateRuleMultiAuth = {\n type: \"MULTI_AUTHORIZATIONS\";\n data: GateRuleMultiAuthStep[];\n};\n\nexport type GateRuleThreshold = {\n type: \"THRESHOLD\";\n data: [\n {\n currency_type: \"CRYPTO\";\n max: string | null;\n min: string | null;\n },\n ];\n};\n\nexport type GateRuleWhitelist = {\n type: \"WHITELIST\";\n data: GateWhitelist[];\n};\n\nexport type GateRuleSCI = {\n type: \"SMART_CONTRACT_INTERACTION\";\n data: [{ enabled: boolean }];\n};\n\ntype GateRuleTransactionFilterPreset =\n | \"TEZOS_DELEGATION\"\n | \"POLKADOT_STAKING\"\n | \"DEPLOY_CONTRACT\"\n | \"SOLANA_STAKING\"\n | \"CARDANO_STAKING\"\n | \"RAW_SIGNING\"\n | \"SEND\"\n | \"MESSAGE_SIGNING\"\n | \"CREATE_SPL_TOKEN_ACCOUNT\"\n | \"TRANSFER_SPL_TOKEN\"\n | \"STAKE\";\n\nexport type GateRuleTransactionFilter = {\n type: \"TRANSACTION_FILTER\";\n data:\n | { preset: Exclude<GateRuleTransactionFilterPreset, \"TRANSFER_SPL_TOKEN\"> }\n | { preset: \"TRANSFER_SPL_TOKEN\"; contract_address: string };\n};\n\nexport type GateGovernanceRule =\n | GateRuleMultiAuth\n | GateRuleThreshold\n | GateRuleWhitelist\n | GateRuleSCI\n | GateRuleTransactionFilter;\n\nexport type GateGovernanceRulesSet = {\n name: string;\n rules: GateGovernanceRule[];\n};\n\nexport type WeirdGateRuleMultiAuthStep =\n | { quorum: number; group_id: number }\n | { quorum: number; users: number[] };\n\nexport type WeirdGateRuleMultiAuth = {\n type: \"MULTI_AUTHORIZATIONS\";\n data: WeirdGateRuleMultiAuthStep[];\n};\n\nexport type WeirdGateRuleThreshold = {\n type: \"THRESHOLD\";\n data: [\n {\n currency_type: \"CRYPTO\";\n // *just* when creating threshold, `max` is optional and can't be null\n max?: string;\n min: string | null;\n },\n ];\n};\n\nexport type WeirdGateRuleWhitelist = {\n type: \"WHITELIST\";\n data: number[];\n};\n\nexport type WeirdGateGovernanceRule =\n | WeirdGateRuleMultiAuth\n | WeirdGateRuleThreshold\n | GateRuleSCI\n | GateRuleTransactionFilter\n | WeirdGateRuleWhitelist;\n\nexport type WeirdGateGovernanceRulesSet = {\n name: string;\n rules: WeirdGateGovernanceRule[];\n};\n\nexport type GateLabel = {\n id: number;\n name: string;\n info: {\n color: string;\n description: string;\n };\n};\n\nexport type GateAccountCommon = {\n id: number;\n account_type: AccountType;\n entityType: \"ACCOUNT\";\n address?: string;\n contract_address: string;\n name: string;\n settings: AccountSettings;\n balance: any; //Bignumber\n available_balance: any; //Bignumber\n currency: string;\n parent_balance?: any; //Bignumber\n has_access_to_parent: boolean | null;\n created_on: string;\n governance_rules: GateGovernanceRulesSet[] | null;\n next_governance_rules: GateGovernanceRulesSet[] | null;\n fresh_addresses: any;\n nfts_gallery_enabled?: boolean;\n is_hsm_coin_app_updated: boolean;\n is_under_edit: boolean;\n index: number;\n status: AccountStatus;\n xpub: string;\n parent: number | null;\n derivation_path: string;\n labels: GateLabel[];\n extended_public_key: {\n public_key: string;\n chain_code: string;\n };\n derivation_mode: \"STANDARD\" | \"NATIVE_SEGWIT\";\n entity_id?: number;\n last_request?: GateAccountRequest;\n is_tradelink?: boolean;\n tradelink_data?: GateAccountTradelinkData;\n synced_on: string | null;\n last_sync_requested_at: string | null;\n policy?: GatePolicy;\n is_raw_signing_account?: boolean;\n};\n\nexport interface GateAccountExchangeOptions {\n auto_repledge_enabled: boolean;\n requires_pre_approval: boolean;\n}\nexport interface GateAccountTradelinkData {\n asset_manager: GateTradelinkAssetManager;\n custodian: GateTradelinkThirdParty<\"CUSTODIAN\">;\n exchanges: Array<GateTradelinkExchange & GateAccountExchangeOptions>;\n total_repledge: string;\n}\n\nexport interface GateAccountEthereum extends GateAccountCommon {\n account_type: \"Ethereum\";\n sci_config: GateSCIConfig | null;\n ethereum_data?: {\n staking?: {\n total_staking: string;\n total_rewards: string;\n available_rewards: string;\n network_apy: string;\n };\n };\n}\n\nexport interface GateTradelinkThirdParty<T extends \"CUSTODIAN\" | \"ASSET_MANAGER\" | \"EXCHANGE\"> {\n code: string;\n id: string;\n logo_url: string | null;\n name: string;\n role: T;\n}\n\nexport interface GateTradelinkRequest extends GateGenericRequest {\n tradelink: GateTradelink;\n type: \"CREATE_TRADELINK\" | \"EDIT_TRADELINK\";\n target_type: \"TRADELINK\";\n edit_data?: {\n operators: string[]; // pub_keys\n };\n}\n\nexport interface GateTradelinkExchangeRequest extends GateGenericRequest {\n tradelink: GateTradelinkExchange;\n type: \"CREATE_TRADELINK_EXCHANGE\" | \"EDIT_TRADELINK_EXCHANGE\";\n target_type: \"TRADELINK_EXCHANGE\";\n tradelink_exchange: GateTradelinkExchange;\n edit_data?: {\n operators: string[]; // pub_keys\n addresses: Array<Omit<GateAddress, \"id\">>;\n };\n}\n\nexport interface GateTradelinkAssetManagerRequest extends GateGenericRequest {\n tradelink: GateTradelinkAssetManager;\n type: \"CREATE_TRADELINK_ASSET_MANAGER\" | \"EDIT_TRADELINK_ASSET_MANAGER\";\n target_type: \"TRADELINK_ASSET_MANAGER\";\n tradelink_asset_manager: GateTradelinkAssetManager;\n edit_data?: {\n operators: string[]; // pub_keys\n addresses: Array<Omit<GateAddress, \"id\">>;\n };\n}\n\nexport type SPLToken = {\n token_name: string;\n associated_token_account: string;\n account_name: string;\n contract_address: string;\n available: string;\n pending: string;\n status: \"ACTIVE\" | \"INACTIVE\" | \"VIEW_ONLY\";\n ticker: string;\n creation_transaction_hash: string;\n parent_id: number;\n};\n\nexport interface GateAccountBitcoin extends GateAccountCommon {\n account_type: \"Bitcoin\";\n}\nexport interface GateAccountERC20 extends GateAccountCommon {\n account_type: \"Erc20\";\n parent_available_balance: BigNumber;\n}\nexport interface GateAccountRipple extends GateAccountCommon {\n account_type: \"Ripple\";\n}\nexport interface GateAccountStellar extends GateAccountCommon {\n account_type: \"Stellar\";\n}\nexport interface GateAccountTezos extends GateAccountCommon {\n account_type: \"Tezos\";\n}\nexport interface GateAccountSolana extends GateAccountCommon {\n account_type: \"Solana\";\n solana_data?: {\n tokens?: SPLToken[];\n can_create_spl_token_accounts: boolean;\n };\n}\nexport interface GateAccountCardano extends GateAccountCommon {\n account_type: \"Cardano\";\n cardano_data: {\n balances: CardanoBalances;\n };\n}\nexport interface GateAccountTron extends GateAccountCommon {\n account_type: \"Tron\";\n}\n\nexport interface GateAccountPolkadot extends GateAccountCommon {\n account_type: \"Polkadot\";\n polkadot_data: PolkadotAccountData;\n}\n\nexport type GateAccount =\n | GateAccountEthereum\n | GateAccountBitcoin\n | GateAccountERC20\n | GateAccountStellar\n | GateAccountTezos\n | GateAccountSolana\n | GateAccountPolkadot\n | GateAccountRipple\n | GateAccountCardano\n | GateAccountTron;\n\nexport type GateVaultEntityStatus = \"PENDING\" | \"ACTIVE\" | \"ABORTED\" | \"REVOKED\" | \"TO_MIGRATE\";\n\nexport type GateWorkspacePermission = \"ROOT\" | \"CREATE_ACCOUNT_WITH_POLICY\";\n\nexport type GateWorkspaceRuleStep = {\n quorum: number;\n users: string[]; // array of public keys\n};\n\nexport type GateWorkspaceRule = {\n id: number;\n permission: GateWorkspacePermission;\n status: \"ACTIVE\";\n steps: GateWorkspaceRuleStep[];\n\n // Gate will never serialize them, but assigning the key to respect what's in all the other entities\n last_request: null;\n};\n\nexport type GateExchange = {\n id: number;\n entityType: \"EXCHANGE\";\n created_by: GateUser;\n created_on: string;\n balances: {\n available: string;\n locked: string;\n total: string;\n };\n governance_rules: GateGovernanceRulesSet[] | null;\n last_request: GateExchangeRequest;\n name: string;\n platform: string;\n status: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type GatePolicy = {\n id: number;\n entityType: \"POLICY\";\n created_by: GateUser;\n created_on: string;\n last_request: GatePolicyRequest;\n name: string;\n currency: string;\n description: string | null;\n governance_rules: GateGovernanceRulesSet[];\n account_ids: GateAccount[\"id\"][];\n status: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type GateTradelinkEntity<T extends \"CUSTODIAN\" | \"ASSET_MANAGER\" | \"EXCHANGE\"> = Omit<\n GateTradelinkThirdParty<T>,\n \"role\"\n>;\n\nexport type GateTradelinkNetwork = {\n id: string;\n asset_managers: GateTradelinkEntity<\"ASSET_MANAGER\">[];\n custodian: GateTradelinkEntity<\"CUSTODIAN\">;\n exchanges: GateTradelinkEntity<\"EXCHANGE\">[];\n};\n\nexport type GateTradelinkOnboardingStatus = {\n status:\n | \"NOT_READY\"\n | \"READY_TO_ONBOARD\"\n | \"CUSTODIAN_ONBOARDED\"\n | \"EXCHANGE_ONBOARDED\"\n | \"HSM_READY\";\n};\n\nexport type GateVaultEntity = {\n id: number;\n entityType: \"VAULT_ENTITY\";\n name: string;\n accounts: GateAccount[];\n status: GateVaultEntityStatus;\n created_on: string;\n last_request?: GateVaultEntityRequest;\n};\n\ntype WhitelistType = \"TRANSACTION\" | \"SMART_CONTRACT\";\n\nexport type GateWhitelist = {\n id: number;\n name: string;\n entityType: \"WHITELIST\";\n description: string;\n addresses: GateAddress[];\n created_on: string;\n created_by: GateUser;\n approvals: Approval[];\n status: \"ACTIVE\" | \"PENDING\" | \"ABORTED\" | \"REVOKED\" | \"TO_MIGRATE\";\n last_request?: GateWhitelistRequest;\n whitelist_type?: WhitelistType;\n is_tradelink?: boolean;\n};\n\ntype GateTransactionNote = {\n title: string;\n content: string;\n};\n\nexport type GateTransactionType =\n | \"SEND\"\n | \"RECEIVE\"\n | \"PREBURN\"\n | \"BURN\"\n | \"MINT\"\n | \"DELEGATE\"\n | \"UNDELEGATE\"\n | \"DELEGATE_VOTE_TO_DREP\"\n | \"STAKING_REGISTER\"\n | \"STAKING_DEREGISTER\"\n | \"STAKING_DELEGATE\"\n | \"STAKING_WITHDRAW\"\n | \"CREATE_SPL_TOKEN_ACCOUNT\";\n\nexport type CardanoVoteDelegationDrep = \"ALWAYS ABSTAIN\" | null;\n\nexport type GateTransaction = {\n id: number;\n account_id: number;\n recipient: string;\n type: GateTransactionType;\n created_on: string;\n created_by: GateUser;\n labels: GateLabel[];\n tx_hash: string;\n status:\n | \"ABORTED\"\n | \"APPROVED\"\n | \"CONFIRMED\"\n | \"DROPPED\"\n | \"FAILED\"\n | \"FAILED_TO_BROADCAST\"\n | \"PENDING_APPROVAL\"\n | \"PENDING_CREATE_IN_HSM\"\n | \"SIGNED\"\n | \"SUBMITTED\";\n amount: string;\n max_fees?: string;\n notes: GateTransactionNote[];\n last_request?: GateTransactionRequest;\n failure_reason?: string | null;\n tx_parameters?: {\n drep?: CardanoVoteDelegationDrep;\n tradelink?: {\n type: \"SETTLEMENT\";\n settlement_id: string;\n pledge_id: string;\n };\n token_address?: string;\n };\n};\n\ntype Approval = {\n created_on: string;\n created_by: GateUser;\n type: \"APPROVE\" | \"ABORT\";\n};\n\nexport type GateAddress = {\n id: number;\n currency: string;\n address: string;\n name: string;\n destination_tags?: number[] | null;\n};\n\nexport type GateGenericRequest = {\n entityType: \"REQUEST\";\n created_by: GateUser | null;\n created_on: string;\n id: number;\n status: string;\n type: string;\n approvals?: RequestApproval[];\n approvals_steps: Array<{\n group: GateGroup;\n quorum: number;\n }>;\n current_step: number;\n target_id: number;\n target_type: string;\n quorum?: number;\n organization?: Organization;\n expired_at: Date;\n edit_data?: any;\n};\n\nexport interface GateAccountRequest extends GateGenericRequest {\n // TODO we probably want to have GateAccountBitcoin/Ethereum..etc.. based on target_type\n account: GateAccount;\n target_type:\n | \"BITCOIN_ACCOUNT\"\n | \"ETHEREUM_ACCOUNT\"\n | \"RIPPLE_ACCOUNT\"\n | \"TEZOS_ACCOUNT\"\n | \"POLKADOT_ACCOUNT\"\n | \"ERC20_ACCOUNT\"\n | \"STELLAR_ACCOUNT\"\n | \"SOLANA_ACCOUNT\"\n | \"CARDANO_ACCOUNT\"\n | \"TRON_ACCOUNT\";\n type:\n | \"CREATE_ACCOUNT\"\n | \"EDIT_ACCOUNT\"\n | \"REVOKE_ACCOUNT\"\n | \"EDIT_TOKEN_RULE\"\n | \"MIGRATE_ACCOUNT\"; // TODO migration code should be remove;\n request_data: Partial<{\n currency: { name: string };\n derivation_mode: string;\n entity_id: number | null;\n governance_rules: GateGovernanceRulesSet[];\n name: string;\n }>;\n}\n\nexport interface GateSPLTokenAccountRequest extends GateGenericRequest {\n account: GateAccount;\n target_type: \"SOLANA_ACCOUNT\";\n type: \"EDIT_TOKEN_RULE\";\n target_id: number;\n edit_data: {\n governance_rules: GateGovernanceRulesSet[];\n };\n request_data: Partial<{\n governance_rules: GateGovernanceRulesSet[];\n }>;\n contract_address: string;\n}\n\nexport interface GateActivateRequest extends GateGenericRequest {\n target_type: GateAccountRequest[\"target_type\"];\n target_id: number;\n target: GateAccount;\n type: \"ACTIVATE\";\n}\n\nexport interface GateRepledgeRequest extends GateGenericRequest {\n repledge: GateRepledge;\n target_type: \"REPLEDGE\";\n type: \"CREATE_REPLEDGE\";\n}\nexport interface GatePledgeIncrementRequest extends GateGenericRequest {\n pledge_increment: GatePledgeIncrement;\n target_type: \"PLEDGE_INCREMENT\";\n type: \"CREATE_PLEDGE_INCREMENT\";\n}\nexport interface GateForcedUnpledgeRequest extends GateGenericRequest {\n forced_unpledge: GateForcedUnpledge;\n target_type: \"FORCED_UNPLEDGE\";\n type: \"CREATE_FORCED_UNPLEDGE\";\n}\n\nexport interface GateUserRequest extends GateGenericRequest {\n url_id: string;\n user: GateUser;\n target_type: \"PERSON\";\n type:\n | \"REVOKE_USER\"\n | \"CREATE_ADMIN\"\n | \"CREATE_OPERATOR\"\n | \"CREATE_API_USER\"\n | \"CREATE_API_USER_ACCESS\"\n | \"MIGRATE_ADMIN\"\n | \"MIGRATE_OPERATOR\"; // TODO migration code should be remove\n}\n\nexport interface GateAPIV2UserAccessRequest extends GateGenericRequest {\n username: string;\n user: GateUser;\n api_key_id: string;\n api_key_secret: string;\n target_type: \"PERSON\";\n type: \"CREATE_API_USER\" | \"CREATE_API_USER_ACCESS\";\n}\n\nexport interface GateSCIConfigRequest extends GateGenericRequest {\n sciconfig: GateSCIConfig;\n target_type: \"SCI_CONFIG\";\n type: \"CREATE_SCICONFIG\" | \"EDIT_SCICONFIG\";\n edit_data?: {\n custom_contract_call_enabled: boolean;\n dapps: string[];\n };\n request_data?: {\n custom_contract_call_enabled: boolean;\n dapps: string[];\n };\n}\n\nexport interface GateMessageRequest extends GateGenericRequest {\n target_type: \"MESSAGE\";\n message: GateMessage;\n type: \"MESSAGE_SIGNING\";\n}\n\nexport interface GateWhitelistRequest extends GateGenericRequest {\n whitelist: GateWhitelist;\n target_type: \"WHITELIST\";\n type: \"CREATE_WHITELIST\" | \"EDIT_WHITELIST\" | \"MIGRATE_WHITELIST\"; // TODO migration code should be remove;\n edit_data?: {\n name?: string;\n addresses: GateAddress[];\n };\n}\n\nexport interface GateExchangeRequest extends GateGenericRequest {\n exchange: GateExchange;\n target_type: \"EXCHANGE\";\n type: \"IMPORT_EXCHANGE\" | \"EDIT_EXCHANGE\" | \"EDIT_EXCHANGE_CREDENTIALS\" | \"REVOKE_EXCHANGE\";\n}\n\nexport interface GateTransactionRequest extends GateGenericRequest {\n // TODO we probably want to have GateTransactionBitcoin/Ethereum..etc.. based on target_type\n transaction: GateTransaction;\n target_type:\n | \"BITCOIN_LIKE_TRANSACTION\"\n | \"ETHEREUM_LIKE_TRANSACTION\"\n | \"RIPPLE_LIKE_TRANSACTION\"\n | \"POLKADOT_LIKE_TRANSACTION\"\n | \"TEZOS_LIKE_TRANSACTION\"\n | \"STELLAR_LIKE_TRANSACTION\"\n | \"CARDANO_LIKE_TRANSACTION\";\n type: \"CREATE_TRANSACTION\";\n}\n\nexport const GateGroupRequestTypeDefs = [\n \"CREATE_GROUP\",\n \"EDIT_GROUP\",\n \"REVOKE_GROUP\",\n \"MIGRATE_GROUP\",\n] as const;\n\nexport interface GateGroupRequest extends GateGenericRequest {\n group: GateGroup;\n target_type: \"GROUP\";\n type: (typeof GateGroupRequestTypeDefs)[number]; // TODO migration code should be remove\n}\n\nexport interface GateDigestsRequest extends GateGenericRequest {\n digests: GateDigestGroup;\n target_type: \"DIGESTS\";\n type: \"SIGN_DIGESTS\";\n}\n\nexport interface GateOrganizationRequest extends GateGenericRequest {\n organization: Organization;\n target_type: \"ORGANIZATION\";\n type: \"UPDATE_QUORUM\";\n}\n\nexport interface GateAPIKeyRequest extends GateGenericRequest {\n api_key: GateAPIKey;\n target_type: \"VAULT_API_KEY\";\n type: \"CREATE_API_KEY\" | \"EDIT_API_KEY\" | \"REVOKE_API_KEY\";\n}\n\nexport interface GateTransferRequest extends GateGenericRequest {\n transfer: GateTransfer;\n target_type: \"TRANSFER\";\n type: \"CREATE_TRANSFER\";\n}\n\nexport interface GateVaultEntityRequest extends GateGenericRequest {\n vaultEntity: GateVaultEntity;\n target_type: \"ENTITY\";\n type: \"CREATE_ENTITY\" | \"EDIT_ENTITY\" | \"REVOKE_ENTITY\";\n edit_data?: {\n name: string;\n accounts: number[];\n };\n}\n\nexport interface GatePolicyRequest extends GateGenericRequest {\n policy: GatePolicy;\n target_type: \"POLICY\";\n type: \"CREATE_POLICY\" | \"EDIT_POLICY\";\n}\n\nexport type Organization = {\n name: string;\n domain_name: string;\n workspace: string;\n number_of_admins: number;\n quorum: number;\n};\n\ntype RequestApproval = {\n created_by: GateUser;\n created_on: string;\n type: string;\n step: number;\n};\n\n// a LAM user is referenced by string\nexport type UserDevice = number | string;\n\nexport type ManifestGroup = {\n name: string;\n users: UserDevice[];\n description?: string;\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type ManifestAccountRuleMultiAuthStep =\n | { quorum: number; users: UserDevice[] }\n | { quorum: number; group: string };\n\nexport type ManifestAccountRuleMultiAuth = {\n type: \"MULTI_AUTHORIZATIONS\";\n steps: ManifestAccountRuleMultiAuthStep[];\n};\n\nexport type ManifestAccountRuleSCI = {\n type: \"SMART_CONTRACT_INTERACTION\";\n enabled: boolean;\n};\n\nexport type ManifestAccountRuleTezosDelegation = {\n type: \"TEZOS_DELEGATION\";\n};\nexport type ManifestAccountRulePolkadotStaking = {\n type: \"POLKADOT_STAKING\";\n};\nexport type ManifestAccountRuleDeployContract = {\n type: \"DEPLOY_CONTRACT\";\n};\nexport type ManifestAccountRuleSolanaStaking = {\n type: \"SOLANA_STAKING\";\n};\nexport type ManifestAccountRuleCardanoStaking = {\n type: \"CARDANO_STAKING\";\n};\nexport type ManifestAccountRuleRawSigning = {\n type: \"RAW_SIGNING\";\n};\nexport type ManifestAccountRuleSend = {\n type: \"SEND\";\n};\nexport type ManifestAccountRuleStake = {\n type: \"STAKE\";\n};\nexport type ManifestAccountRuleMessageSigning = {\n type: \"MESSAGE_SIGNING\";\n};\n\nexport type ManifestAccountRuleCreateSplTokenAccount = {\n type: \"CREATE_SPL_TOKEN_ACCOUNT\";\n};\n\nexport type ManifestAccountRuleTransferSplToken = {\n type: \"TRANSFER_SPL_TOKEN\";\n contractAddress: string;\n};\n\nexport type ManifestAccountRuleWhitelist = {\n type: \"WHITELIST\";\n whitelists: string[];\n};\n\nexport type ManifestAccountRuleThreshold = {\n type: \"THRESHOLD\";\n min?: number;\n max?: number;\n};\n\nexport type ManifestAccountRule =\n | ManifestAccountRuleMultiAuth\n | ManifestAccountRuleWhitelist\n | ManifestAccountRuleSCI\n | ManifestAccountRuleDeployContract\n | ManifestAccountRuleThreshold\n | ManifestAccountRulePolkadotStaking\n | ManifestAccountRuleSolanaStaking\n | ManifestAccountRuleCardanoStaking\n | ManifestAccountRuleRawSigning\n | ManifestAccountRuleTezosDelegation\n | ManifestAccountRuleSend\n | ManifestAccountRuleMessageSigning\n | ManifestAccountRuleCreateSplTokenAccount\n | ManifestAccountRuleTransferSplToken\n | ManifestAccountRuleStake;\n\nexport type ManifestAccountConfig = {\n nftGallery?: boolean;\n};\n\ntype ManifestTradelinkOrg = {\n name: string;\n};\n\ntype AccountTradelinkExchangeData = {\n name: string;\n requires_pre_approval: boolean;\n auto_repledge_enabled: boolean;\n};\n\nexport type ManifestAccountTradelinkData = {\n currency: string;\n custodian: ManifestTradelinkOrg;\n asset_manager: ManifestTradelinkOrg;\n exchanges: AccountTradelinkExchangeData[];\n};\n\ntype ManifestCryptoAccount = {\n name: string;\n currency: string;\n accountType?: string;\n derivationMode?: string;\n rules?: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ABORTED\" | \"ACTIVE\";\n index?: number;\n readOnly?: {\n xpub: string;\n publicKey: string;\n chainCode: string;\n address?: string;\n };\n tradelink_data?: ManifestAccountTradelinkData;\n // all the fields that doesn't require a request to be changed\n config?: ManifestAccountConfig;\n};\n\ntype ManifestERC20Account = {\n name: string;\n contractAddress: string;\n parentAccount?: string;\n rules?: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ABORTED\" | \"ACTIVE\";\n index?: number;\n tradelink_data?: ManifestAccountTradelinkData;\n};\n\nexport type ManifestAccount = ManifestCryptoAccount | ManifestERC20Account;\n\nexport type ManifestVaultEntity = {\n name: string;\n accounts?: string[];\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type ManifestWhitelistAddress = {\n currency: string;\n name?: string;\n address: string;\n destination_tags?: number[] | null;\n};\n\nexport type ManifestWhitelist = {\n name: string;\n addresses: ManifestWhitelistAddress[];\n description?: string;\n status?: \"PENDING\" | \"ABORTED\";\n type?: WhitelistType;\n};\n\nexport type ManifestUser = {\n device: number;\n};\n\nexport type ManifestAPIUser = {\n name: string;\n viewAll?: boolean;\n};\n\nexport type ManifestAPIV2User = {\n name: string;\n role: string;\n publicKey?: string;\n viewAll?: boolean;\n};\n\nexport type ManifestExchange = {\n name: string;\n platform: string;\n rules?: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n\n // note for the future: one day we will be able to put\n // extra fields in the configuration, for now, all exchanges\n // receive `apiKey` and `secret` only\n configuration: {\n apiKey: string;\n apiSecret: string;\n };\n};\n\nexport type ManifestPolicy = {\n name: string;\n currency: string;\n rules: Array<ManifestAccountRule[]>;\n status?: \"PENDING\" | \"ACTIVE\" | \"ABORTED\";\n};\n\nexport type ManifestWorkspaceRuleStep = {\n quorum: number;\n users: string[]; // array of api admin usernames\n};\n\nexport type ManifestWorkspaceRule = {\n permission: Exclude<GateWorkspacePermission, \"ROOT\">;\n steps: ManifestWorkspaceRuleStep[];\n};\n\ninterface ManifestCommon {\n salt?: string;\n quorum?: number;\n customUsernames?: Record<string, string>;\n groups?: ManifestGroup[];\n accounts?: ManifestAccount[];\n entities?: ManifestVaultEntity[];\n whitelists?: ManifestWhitelist[];\n exchanges?: ManifestExchange[];\n policies?: ManifestPolicy[];\n tradelink?: ManifestTradelink;\n contractApprovals?: ManifestContractApproval[];\n workspaceRules?: ManifestWorkspaceRule[];\n}\n\nexport type ManifestTradelink = {\n onboarded: boolean;\n exchanges: ManifestTradelinkEntityWithAddresses[];\n assetManagers: ManifestTradelinkEntityWithAddresses[];\n custodians: ManifestTradelinkEntity[];\n};\n\nexport type ManifestTradelinkEntity = {\n id: string;\n name: string;\n logoUrl: string;\n code: string;\n users: {\n operators?: number[];\n apiV2?: string[];\n };\n};\n\nexport type ManifestTradelinkEntityWithAddresses = {\n id: string;\n name: string;\n logoUrl: string;\n code: string;\n users: {\n operators?: number[];\n apiV2: string[];\n };\n addresses: ManifestWhitelistAddress[];\n};\n\nexport type ManifestContractApproval = {\n user: number;\n contractNames: string[];\n};\n\nexport interface Manifest extends ManifestCommon {\n users?: {\n operators?: Array<number | ManifestUser>;\n admins?: Array<number | ManifestUser>;\n api?: Array<string | ManifestAPIUser>;\n apiV2?: Array<ManifestAPIV2User>;\n };\n}\n\nexport interface DeserializedManifest extends ManifestCommon {\n users?: {\n operators?: ManifestUser[];\n admins?: ManifestUser[];\n api?: ManifestAPIUser[];\n apiV2?: ManifestAPIV2User[];\n };\n}\n\nexport const feesLevels = [\"SLOW\", \"NORMAL\", \"FAST\", \"CUSTOM\"] as const;\nexport type FeesLevel = (typeof feesLevels)[number];\n\nexport type ManifestTransaction = {\n // account name\n account: string;\n // recipient address\n recipient: string;\n // transaction amount in default unit (e.g BTC)\n amount: string | number;\n utxosPickingStrategy?: UTXOsPickingStrategy;\n contractPayload?: string;\n transactionType?: GateTransactionType;\n feesLevel?: FeesLevel;\n gasPrice?: string;\n gasLimit?: string;\n title?: string;\n comment?: string;\n maxFees?: string;\n\n // EIP1559-specific\n baseFees?: string;\n maxFeesBufferFactor?: string;\n priorityFees?: string;\n};\n\nexport type OnboardingContext = {\n pool: DevicesPool;\n getState: () => Promise<any>;\n getChallenge: () => Promise<any>;\n next: (data?: any) => Promise<void>;\n collectMasterSeedFragment: (challenge: any, deviceIndex: number) => Promise<void>;\n validateSO: (challenge: any, deviceIndex: number) => Promise<void>;\n registerAdmin: (data: any, deviceIndex: number) => Promise<void>;\n registerSO: (data: any, deviceIndex: number) => Promise<void>;\n registerWrappingKey: (challenge: any, deviceIndex: number) => Promise<void>;\n};\n\nexport type OnboardingStep =\n | \"WRAPPING_KEYS_REGISTRATION\"\n | \"ADMINS_REGISTRATION\"\n | \"QUORUM_SETTINGS\"\n | \"SHARED_OWNERS_REGISTRATION\"\n | \"ADMIN_APPROVALS\"\n | \"MASTER_SEED_GENERATION\";\n\nexport interface RecordLogger extends Logger {\n logs: string[];\n reset: () => void;\n expect: (s: string) => void;\n}\n\nexport type RunnableOptions = {\n logger?: Logger;\n};\n\nexport type MockNetworkResponse = [\n string, // verb: GET, POST, ...\n string, // url\n number, // returned status code\n any?, // returned data\n any?, // expected request payload\n any?, // returned headers\n any?, // expected request headers\n];\n\nexport type LegacyERC20Token = {\n blockchain_name: \"foundation\" | \"ropsten\" | \"goerli\";\n contract_address: string;\n decimals: number;\n hsm_account_parameters: string;\n hsm_signature: string;\n name: string;\n ticker: string;\n};\n\nexport type GateCoinCapabilities = {\n signer: {\n raw_signing_supported: boolean;\n send_clear_signing_supported: boolean;\n stake_clear_signing_supported: boolean;\n };\n wallet: {\n balance_supported: boolean;\n broadcast_supported: boolean;\n crafting_supported: boolean;\n tx_history_supported: boolean;\n };\n};\n\nexport type GateTokenCurrency = {\n contract_address: string;\n family: \"ethereum\";\n name: string;\n parent_currency: \"ethereum\" | \"ethereum_ropsten\" | \"ethereum_goerli\" | \"bsc\";\n ticker: string;\n token_type: \"erc20\" | \"stablecoin\" | \"bep20\";\n units: [Unit];\n delisted?: boolean;\n disable_countervalue?: boolean;\n capabilities?: GateCoinCapabilities;\n\n // FIXME: here only for retro-compatibility with gate < 3.6 (that expect front to send hsm parameters)\n __legacy_hsm_account_parameters?: string;\n __legacy_hsm_signature?: string;\n};\n\nexport type GateCurrency = {\n name: string;\n type: \"CRYPTO\";\n family: string;\n confirmations_needed: number;\n units: Unit[];\n capabilities?: GateCoinCapabilities;\n};\n\n// surprisingly the gate expect some fields to change\n// from the erc20 token *it literally send* us\nexport type WeirdGateERC20Token = {\n ticker: string;\n address: string;\n decimals: number;\n hsm_signature: string;\n hsm_account_parameters: string;\n};\n\nexport type WeirdGateTokenCurrency = {\n type: \"erc20\" | \"stablecoin\";\n address: string;\n};\n\nexport type DaemonAddress = {\n address: string;\n derivation_path: string;\n};\n\nexport type VaultEvent =\n | Ev<\"ACCOUNT_UPDATED\", GateAccount>\n | Ev<\"REQUEST_CREATED\", GateRequest>\n | Ev<\"REQUEST_ABORTED\", GateRequest>\n | Ev<\"REQUEST_APPROVAL\", GateRequest>\n | Ev<\"REQUEST_APPROVED\", GateRequest>\n | Ev<\"TRANSACTION_BROADCASTED\", GateTransaction>\n | Ev<\"TRANSACTION_RECEIVED\", GateTransaction>\n | Ev<\"TRANSACTION_FAILED\", GateTransaction>\n | Ev<\"USER_REGISTERED\", GateUser>\n | Ev<\"USER_SUSPENDED\", GateUser>;\n\ntype Ev<T, P> = { type: T; payload: P };\n\nexport type { CryptoCurrency, TokenCurrency };\nexport type UserWithDevice = { deviceIndex: number; user: GateUser };\nexport type UserWithoutDevice = { username: string; user: GateUser };\n\nexport type CurrencyOrToken = CryptoCurrency | TokenCurrency;\n\nexport type Network = <T>(\n method: \"POST\" | \"PUT\" | \"GET\" | \"DELETE\",\n url: string,\n data?: any,\n requestOptions?: any,\n) => Promise<T>;\n\nexport type WipeOptions = {\n gate: string;\n lam?: string;\n lamAPIKey?: string;\n hsmCompartmentID: number;\n hsmEndpoint: string;\n hsmCert: Buffer;\n hsmCertKey: Buffer;\n monotonicCountersSize?: number;\n fileSystemSize?: number;\n};\n\nexport interface BakeManifestOptions extends RunnableOptions {\n noApproval?: boolean;\n runner?: ManifestRunner;\n untilStep?: OnboardingStep;\n twoStepsRequest?: boolean;\n waitForActive?: boolean;\n\n // revault-compat onboarding\n revaultOnboarding?: {\n compartmentId: number;\n hsmScriptsVersion: string;\n revaultApiUrl: string;\n revaultRootAuthToken: string;\n };\n}\n\n// 'MR' stands for 'ManifestRunner'\ntype MRAction<P, R> = (params: P) => Promise<R>;\n\nexport type MRCreateUserParams = {\n role: \"admin\" | \"operator\";\n userID: string;\n name: string;\n device: number;\n};\n\nexport type MRCreateAPIUserParams = {\n user: ManifestAPIUser;\n userID: string;\n name: string;\n};\n\nexport type MRCreateAPIV2UserParams = {\n user: ManifestAPIV2User;\n publicKey: string;\n role: string;\n name: string;\n};\n\nexport type MRBakeGroupParams = {\n group: ManifestGroup;\n data: DataGroup;\n existingRequest: GateGroupRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakeAccountParams = {\n account: ManifestAccount;\n data: DataAccount;\n existingRequest: GateAccountRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n waitForActive?: boolean;\n tradelinkAM?: ManifestAPIV2User;\n};\n\nexport type MRBakeVaultEntityParams = {\n vaultEntity: ManifestVaultEntity;\n data: DataVaultEntity;\n existingRequest: GateVaultEntityRequest | null;\n noApproval: boolean;\n};\n\nexport type MRBakeWhitelistParams = {\n whitelist: ManifestWhitelist;\n data: DataWhitelist;\n existingRequest: GateWhitelistRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakeExchangeParams = {\n exchange: ManifestExchange;\n data: DataExchange;\n existingRequest: GateExchangeRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakePolicyParams = {\n policy: ManifestPolicy;\n data: DataPolicy;\n existingRequest: GatePolicyRequest | null;\n noApproval: boolean;\n twoStepsRequest?: boolean;\n};\n\nexport type MRBakeTradelinkOnboardingParams = {\n type: \"CREATE_TRADELINK\";\n operators: string[];\n};\n\nexport type MREditQuorumParams = {\n quorum: number;\n};\n\nexport type MREditWorkspaceRuleParams = {\n rule: ManifestWorkspaceRule;\n usersByName: Record<string, GateUser>;\n};\n\nexport type MBRBakeTradelinkEntityWithAddresses = {\n operators: string[];\n addresses: ManifestWhitelistAddress[];\n name: string;\n};\n\nexport type MRBakeTradelinkEntityParams = {\n tradelinkEntity: ManifestTradelinkEntity | ManifestTradelinkEntityWithAddresses;\n type: \"asset_managers\" | \"exchanges\" | \"custodians\";\n};\n\nexport type MRBakeTradelinkEntityOnboardingParams = {\n tradelinkEntity: MBRBakeTradelinkEntityWithAddresses;\n type: \"asset_managers\" | \"exchanges\";\n tradelinkEntityApprover: ManifestAPIV2User; // entity approver, like exchange approver of the exchange\n};\n\nexport type MRBakeTradelinkNetworkParams = {\n custodians: DataTradelinkNetworkEntity<\"CUSTODIAN\">[];\n exchanges: DataTradelinkNetworkEntity<\"EXCHANGE\">[];\n assetManagers: DataTradelinkNetworkEntity<\"ASSET_MANAGER\">[];\n};\n\nexport type DataTradelinkNetworkEntity<T extends \"CUSTODIAN\" | \"EXCHANGE\" | \"ASSET_MANAGER\"> = Pick<\n GateTradelinkThirdParty<T>,\n \"id\" | \"name\"\n>;\n\nexport type ManifestRunner = {\n editQuorum: (params: MREditQuorumParams) => Promise<void>;\n editWorkspaceRule: (params: MREditWorkspaceRuleParams) => Promise<void>;\n\n createUser: MRAction<MRCreateUserParams, GateUserRequest>;\n createAPIUser: (\n params: MRCreateAPIUserParams,\n r: RecipeManifestResult,\n ) => Promise<GateUserRequest>;\n createAPIV2User: MRAction<MRCreateAPIV2UserParams, GateUserRequest>;\n createAPIV2UserAccess: MRAction<MRCreateAPIV2UserParams, GateAPIV2UserAccessRequest>;\n\n createGroup: MRAction<MRBakeGroupParams, GateGroupRequest>;\n editGroup: MRAction<MRBakeGroupParams, GateGroupRequest>;\n\n createAccount: MRAction<MRBakeAccountParams, GateAccountRequest>;\n editAccount: MRAction<MRBakeAccountParams, GateAccountRequest>;\n\n createVaultEntity: MRAction<MRBakeVaultEntityParams, GateVaultEntityRequest>;\n editVaultEntity: MRAction<MRBakeVaultEntityParams, GateVaultEntityRequest>;\n\n createWhitelist: MRAction<MRBakeWhitelistParams, GateWhitelistRequest>;\n editWhitelist: MRAction<MRBakeWhitelistParams, GateWhitelistRequest>;\n\n createExchange: MRAction<MRBakeExchangeParams, GateExchangeRequest>;\n editExchange: MRAction<MRBakeExchangeParams, GateExchangeRequest>;\n\n createPolicy: MRAction<MRBakePolicyParams, GatePolicyRequest>;\n\n createTradelink: MRAction<MRBakeTradelinkOnboardingParams, GateTradelinkRequest>;\n createTradelinkEntity: <T extends \"ASSET_MANAGER\" | \"EXCHANGE\" | \"CUSTODIAN\">(\n params: MRBakeTradelinkEntityParams,\n ) => Promise<GateTradelinkEntity<T>>;\n onboardTradelinkEntity: MRAction<\n MRBakeTradelinkEntityOnboardingParams,\n GateTradelinkExchangeRequest | GateTradelinkAssetManagerRequest\n >;\n createTradelinkNetwork: MRAction<MRBakeTradelinkNetworkParams, GateTradelinkNetwork>;\n};\n\nexport type HsmCertificate = {\n attestation_pub: string;\n certificate: string;\n code_hash: string;\n signature: string;\n};\n\nexport type SecureChannel = {\n request_id: string;\n handshake: string;\n ciphertext: string;\n challenge: string;\n u2f_register_data: string;\n // defined for user registration\n handshake_attestation?: HsmCertificate;\n};\n\n// TODO centralize types with vault-remote\nexport type DeploymentStepID =\n | \"checkConnectivity\"\n | \"createNamespace\"\n | \"installNamespace\"\n | \"setupFeatureFlagsProvider\"\n | \"waitPods\"\n | \"success\";\n\nexport type DeploymentStep = {\n key: DeploymentStepID;\n labelWaiting: string;\n labelCurrent: string;\n labelSuccess: string;\n};\n\nexport type MVInstanceDeploymentFF = { key: string; set: boolean };\n\nexport type MVInstanceDeployment = {\n id: string;\n\n startedOn: Date;\n finishedOn: Date | null;\n\n status: \"BUSY\" | \"SUCCESS\" | \"ERROR\";\n steps: DeploymentStep[];\n currentStep: DeploymentStepID;\n\n instance: MVInstance;\n flags: Array<MVInstanceDeploymentFF>;\n\n error: Error | null;\n spawnFailTimeout?: ReturnType<typeof setTimeout>;\n};\n\nexport type MVPod = {\n name: string;\n podName: string;\n status: \"BUSY\" | \"HEALTHY\" | \"ERROR\" | \"EVICTED\";\n};\n\nexport type MVInstance = {\n name: string;\n status: string;\n host: string;\n pods: MVPod[];\n};\n\nexport type InteractionResponses = {\n network: Network;\n transport: any;\n secure_channel: any;\n pairing_payload: any;\n blob: any;\n confidentiality_key: any;\n attestation: any;\n u2f_key: any;\n onboardingRegisterChallenge: any;\n role: any;\n username: any;\n register_data: any;\n validation_key: any;\n u2f_register: any;\n validate_device: any;\n attested_handshake: any;\n};\n\nexport type Interaction<T> = {\n responseKey: string;\n action: (responses: InteractionResponses) => Promise<T>;\n device?: boolean;\n};\n\nexport type GetU2FPubKeyInteraction = Interaction<{\n pubKey: string;\n signature: Buffer;\n}>;\n\nexport type Interactions = {\n approveFlow: Interaction<any>[];\n approveFlowWithoutHSM: Interaction<any>[];\n doStartKpatternAsResponder: Interaction<any>;\n validateDevice: Interaction<any>;\n validatePayload: Interaction<any>;\n postApproval: Interaction<any>;\n postSimpleApproval: Interaction<any>;\n ensurePartitionPairing: Interaction<any>;\n finalizePairing: Interaction<any>;\n getAttestation: Interaction<{ attestation: Buffer }>;\n getConfidentialityPublicKey: Interaction<any>;\n getSecureChannel: Interaction<any>;\n getU2FChallenge: Interaction<any>;\n getU2FPublicKey: GetU2FPubKeyInteraction;\n getValidationPublicKey: Interaction<any>;\n initPairing: Interaction<any>;\n loginFlow: Interaction<any>[];\n operatorGetChallenge: Interaction<any>;\n postU2FSignature: Interaction<any>;\n postUserRegistration: Interaction<any>;\n readOnlyLoginFlow: (userName: string) => Interaction<any>[];\n registerUserFlow: Interaction<any>[];\n u2fAuthenticate: Interaction<any>;\n validateOperation: Interaction<any>[];\n};\n\n// API Types\nexport type APIBearerTokenResponse = {\n access_token: string;\n expires_in: number;\n refresh_token: string;\n session_state: string;\n token_type: string;\n};\n\nexport type APIGetChallengeResponse = {\n challenge: string;\n id: number;\n};\n\n// FIXME properly define this type at this is the response to /request\n// and it handle a lot of type, request target, request id\nexport type APIRequestResponse = {\n id: number;\n status: \"PENDING_APPROVAL\" | \"APPROVED\" | \"SUBMITTED\" | \"ABORTED\";\n};\n\nexport type APICreateTransactionRequest = {\n data: APIBitcoinLikeSend | APIEthereumLikeSend;\n note?: {\n content: string;\n title: string;\n };\n type: \"CREATE_TRANSACTION\";\n};\n\nexport type APIGenericSend = {\n account_id: number;\n fees_strategy: GenericFeesStrategy;\n transaction_data: {\n account_name: string;\n amount: string;\n max_fees: string;\n recipient: string;\n };\n};\n\nexport type APIBitcoinLikeSend = APIGenericSend & {\n transaction_data: {\n currency: \"bitcoin\" | \"bitcoin_testnet\";\n };\n transaction_type: \"BITCOIN_LIKE_SEND\";\n};\n\nexport type APIEthereumLikeSend = APIGenericSend & {\n transaction_data: {\n currency: \"ethereum\" | \"ethereum_sepolia\" | \"polygon\" | \"ethereum_holesky\";\n contract_address?: string;\n };\n transaction_type: \"ETHEREUM_LIKE_SEND\";\n};\n\ntype GenericFeesStrategy = {\n type: \"SPEED\";\n data: {\n speed: \"FAST\" | \"NORMAL\" | \"SLOW\";\n };\n};\n\n// FIXME properly define this type\nexport type APIEstimateFeesResponse = {\n max_fees: string;\n};\n\nexport type PsdModel = \"BLUE\" | \"STAX\";\n"]}
|