@ledgerhq/vault-common 2.1.1 → 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 +19 -59
- package/CHANGELOG.md +12 -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 +8 -9
- package/tsup.config.ts +1 -1
- package/lib/chunk-54MXA3ZY.mjs +0 -14
- package/lib/chunk-54MXA3ZY.mjs.map +0 -1
- package/lib/chunk-6TT6A6YA.mjs +0 -1176
- package/lib/chunk-6TT6A6YA.mjs.map +0 -1
- package/lib/chunk-GAKIXPAF.js.map +0 -1
- package/lib/chunk-HU7O2ZFW.mjs +0 -249
- package/lib/chunk-HU7O2ZFW.mjs.map +0 -1
- package/lib/chunk-J5LGTIGS.mjs +0 -10
- package/lib/chunk-J5LGTIGS.mjs.map +0 -1
- package/lib/chunk-MNUHUKY3.mjs +0 -503
- package/lib/chunk-MNUHUKY3.mjs.map +0 -1
- package/lib/chunk-QNNV5GBH.mjs +0 -1261
- package/lib/chunk-QNNV5GBH.mjs.map +0 -1
- package/lib/chunk-VOB7PA3G.mjs +0 -97
- package/lib/chunk-VOB7PA3G.mjs.map +0 -1
- package/lib/chunk-ZJCMYPBL.mjs +0 -83
- package/lib/chunk-ZJCMYPBL.mjs.map +0 -1
- package/lib/createHSMBridge.d.mts +0 -27
- package/lib/createHSMBridge.mjs +0 -10
- package/lib/createHSMBridge.mjs.map +0 -1
- package/lib/crypto/utils.d.mts +0 -14
- package/lib/crypto/utils.mjs +0 -12
- package/lib/crypto/utils.mjs.map +0 -1
- package/lib/index-Cm_O9VIx.d.mts +0 -2010
- package/lib/index.d.mts +0 -161
- package/lib/index.mjs +0 -3252
- package/lib/index.mjs.map +0 -1
- package/lib/recipeManifest.d.mts +0 -6
- package/lib/recipeManifest.mjs +0 -11
- package/lib/recipeManifest.mjs.map +0 -1
- package/lib/reviewAPIRequest.d.mts +0 -20
- package/lib/reviewAPIRequest.mjs +0 -11
- package/lib/reviewAPIRequest.mjs.map +0 -1
- package/lib/types/index.d.mts +0 -6
- package/lib/types/index.mjs +0 -10
- package/lib/types/index.mjs.map +0 -1
- package/lib/utils.d.mts +0 -29
- package/lib/utils.mjs +0 -38
- package/lib/utils.mjs.map +0 -1
package/lib/index.d.mts
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
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-Cm_O9VIx.mjs';
|
|
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-Cm_O9VIx.mjs';
|
|
3
|
-
import { Agent } from 'https';
|
|
4
|
-
export { default as reviewAPIRequest } from './reviewAPIRequest.mjs';
|
|
5
|
-
export { ExtendedPubKey, LIGHT_EVM_CURRENCIES, deserializeUnitValue, extractSecureChannel, getAccountTypeByCurrency, getAccountUnit, getCurrencyOrToken, getCurrencyUnit, getDefaultUsername, getGateAccountUnit, getTokenUnit, getWorkspaceFromGate, queue, serializeUnitValue, unwrapConnection, wait, xpubToExtendedPubKey } from './utils.mjs';
|
|
6
|
-
import { RecordStore } from '@ledgerhq/hw-transport-mocker';
|
|
7
|
-
import { listCryptoCurrencies as listCryptoCurrencies$1 } from '@ledgerhq/cryptoassets/lib/currencies';
|
|
8
|
-
import { CryptoCurrency } from '@ledgerhq/types-cryptoassets';
|
|
9
|
-
export { CryptoCurrency, TokenCurrency } from '@ledgerhq/types-cryptoassets';
|
|
10
|
-
import '@ledgerhq/vault-utils';
|
|
11
|
-
import 'bignumber.js';
|
|
12
|
-
import 'socket.io-client';
|
|
13
|
-
|
|
14
|
-
declare function getAuthTokens(apiNetwork: Network, workspace: string, apiUserAuth: {
|
|
15
|
-
api_key_id: string;
|
|
16
|
-
api_key_secret: string;
|
|
17
|
-
}): Promise<APIBearerTokenResponse>;
|
|
18
|
-
|
|
19
|
-
declare function bakeManifest(_manifest: Manifest, pool: DevicesPool, options?: BakeManifestOptions): Promise<void>;
|
|
20
|
-
|
|
21
|
-
type ConfigCatConfiguration = {
|
|
22
|
-
apiKey: string | null;
|
|
23
|
-
productId: string | null;
|
|
24
|
-
configId: string | null;
|
|
25
|
-
};
|
|
26
|
-
type ConfigCatKeys = {
|
|
27
|
-
sdkKey: string;
|
|
28
|
-
productId: string;
|
|
29
|
-
configId: string;
|
|
30
|
-
environmentId: string;
|
|
31
|
-
};
|
|
32
|
-
declare function createConfigCatEnvironment(ccConfig: ConfigCatConfiguration, environmentName: string): Promise<ConfigCatKeys | null>;
|
|
33
|
-
declare function deleteConfigCatEnvironment(ccConfig: ConfigCatConfiguration, environmentName: string): Promise<void>;
|
|
34
|
-
declare function setConfigCatFeatureFlagValues(ccConfig: ConfigCatConfiguration, environmentName: string, flagValues: Record<string, any>, { logger }?: RunnableOptions): Promise<void>;
|
|
35
|
-
|
|
36
|
-
declare const createDevicesPool: (options: PoolOptions, { logger }?: RunnableOptions) => DevicesPool;
|
|
37
|
-
|
|
38
|
-
type CreateFaucetOptions = {
|
|
39
|
-
pralineBTCTestnetURL?: string;
|
|
40
|
-
};
|
|
41
|
-
type FaucetOptions = FaucetImplementationOptions & {
|
|
42
|
-
currency: string;
|
|
43
|
-
};
|
|
44
|
-
type Faucet = (opts: FaucetOptions) => Promise<TxHash>;
|
|
45
|
-
type FaucetImplementationOptions = {
|
|
46
|
-
recipient: string;
|
|
47
|
-
amount: string;
|
|
48
|
-
};
|
|
49
|
-
type TxHash = string;
|
|
50
|
-
declare function createFaucet(opts: CreateFaucetOptions): Faucet;
|
|
51
|
-
|
|
52
|
-
interface NetworkOptions {
|
|
53
|
-
baseURL: string;
|
|
54
|
-
token?: string;
|
|
55
|
-
interceptToken?: (token: string) => void;
|
|
56
|
-
injectToken?: () => string | null;
|
|
57
|
-
httpsAgent?: Agent;
|
|
58
|
-
networkDelay?: number;
|
|
59
|
-
}
|
|
60
|
-
declare function createNetwork(networkOptions: NetworkOptions): <T = any>(method: "POST" | "GET" | "DELETE" | "PUT", url: string, data?: any, requestOptions?: any) => Promise<T>;
|
|
61
|
-
|
|
62
|
-
type CreatePledgeOptions = {
|
|
63
|
-
pool: DevicesPool;
|
|
64
|
-
account: ManifestAccount;
|
|
65
|
-
accountsByName: Record<string, GateAccount>;
|
|
66
|
-
exchange: string;
|
|
67
|
-
amount: string;
|
|
68
|
-
apiUser: ManifestAPIV2User;
|
|
69
|
-
gate: string;
|
|
70
|
-
apiGateway: string;
|
|
71
|
-
};
|
|
72
|
-
declare function createPledge({ pool, account, accountsByName, exchange, amount, apiUser, gate, apiGateway, }: CreatePledgeOptions, { logger }?: RunnableOptions): Promise<APIRequestResponse>;
|
|
73
|
-
|
|
74
|
-
type CreateSettlementOptions = {
|
|
75
|
-
pool: DevicesPool;
|
|
76
|
-
account: ManifestAccount;
|
|
77
|
-
accountsByName: Record<string, GateAccount>;
|
|
78
|
-
exchange: string;
|
|
79
|
-
percentage: number;
|
|
80
|
-
apiUser: ManifestAPIV2User;
|
|
81
|
-
gate: string;
|
|
82
|
-
apiGateway: string;
|
|
83
|
-
};
|
|
84
|
-
declare function createSettlement({ pool, account, accountsByName, exchange, percentage, apiUser, gate, apiGateway, }: CreateSettlementOptions, { logger }?: RunnableOptions): Promise<any>;
|
|
85
|
-
|
|
86
|
-
declare function deploy(opts: DeployOptions, { logger }?: RunnableOptions): Promise<{
|
|
87
|
-
url: string;
|
|
88
|
-
}>;
|
|
89
|
-
|
|
90
|
-
declare function destroy(opts: DestroyOptions, { logger }?: RunnableOptions): Promise<void>;
|
|
91
|
-
|
|
92
|
-
declare function setDeviceAPIEndpoint(url: string): void;
|
|
93
|
-
type CreateAPIDeviceOptions = {
|
|
94
|
-
deviceAPISessionID?: string;
|
|
95
|
-
salt?: string;
|
|
96
|
-
overrideSeeds?: string[];
|
|
97
|
-
deviceAPIURL?: string;
|
|
98
|
-
psdModel?: PsdModel;
|
|
99
|
-
};
|
|
100
|
-
declare function createAPIDevice(options?: CreateAPIDeviceOptions): APIDevice;
|
|
101
|
-
|
|
102
|
-
declare function createInteractions(device: Device): Interactions;
|
|
103
|
-
|
|
104
|
-
declare function fetchERC20Tokens(ctx: UserContext, { logger }?: RunnableOptions): Promise<GateTokenCurrency[]>;
|
|
105
|
-
|
|
106
|
-
declare const genSeed: (salt?: string, index?: number, options?: {
|
|
107
|
-
overrideSeeds?: string[];
|
|
108
|
-
}) => string;
|
|
109
|
-
|
|
110
|
-
declare function getMVInstances(opts: {
|
|
111
|
-
remoteURL?: string;
|
|
112
|
-
}, { logger }?: RunnableOptions): Promise<MVInstance[]>;
|
|
113
|
-
|
|
114
|
-
type SendOptions = {
|
|
115
|
-
pool: DevicesPool;
|
|
116
|
-
transaction: ManifestTransaction;
|
|
117
|
-
account: ManifestAccount;
|
|
118
|
-
groups?: ManifestGroup[];
|
|
119
|
-
accountsByName: Record<string, GateAccount>;
|
|
120
|
-
whitelistsByName: Record<string, GateWhitelist>;
|
|
121
|
-
noApproval?: boolean;
|
|
122
|
-
utxosPickingStrategy?: UTXOsPickingStrategy;
|
|
123
|
-
contractPayload?: string;
|
|
124
|
-
};
|
|
125
|
-
declare function send({ pool, transaction, account, accountsByName, whitelistsByName, noApproval, groups, }: SendOptions, { logger }?: RunnableOptions): Promise<GateTransaction>;
|
|
126
|
-
|
|
127
|
-
declare function upgrade(opts: UpgradeOptions, { logger }?: RunnableOptions): Promise<void>;
|
|
128
|
-
|
|
129
|
-
declare function validateManifest(_manifest: Manifest): void;
|
|
130
|
-
|
|
131
|
-
declare function wipeBackend(wipeOpts: WipeOptions, runnableOpts?: RunnableOptions): Promise<void>;
|
|
132
|
-
|
|
133
|
-
declare const DEFAULT_VAULT_REMOTE_URL = "https://remote.minivault.ledger-sbx.com";
|
|
134
|
-
declare const DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES = 10;
|
|
135
|
-
|
|
136
|
-
type CreateRunnerOptions = {
|
|
137
|
-
readOnly?: boolean;
|
|
138
|
-
transport: TransportType;
|
|
139
|
-
recordStore?: RecordStore | null;
|
|
140
|
-
acceptPollingError?: (err: unknown) => boolean;
|
|
141
|
-
};
|
|
142
|
-
type Runner = (_interactions: Interaction<any>[], _data?: any, options?: {
|
|
143
|
-
onStepStart?: (responseKey: string) => void;
|
|
144
|
-
onStepDone?: <D>(res: {
|
|
145
|
-
responseKey: string;
|
|
146
|
-
value: D;
|
|
147
|
-
}) => void;
|
|
148
|
-
}) => Promise<Record<string, unknown>>;
|
|
149
|
-
declare const createRunner: (allInteractions: Interactions, { readOnly, transport, recordStore, acceptPollingError }?: CreateRunnerOptions) => Runner;
|
|
150
|
-
|
|
151
|
-
type index_Runner = Runner;
|
|
152
|
-
declare const index_createRunner: typeof createRunner;
|
|
153
|
-
declare namespace index {
|
|
154
|
-
export { type index_Runner as Runner, index_createRunner as createRunner };
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
declare const vaultCoins: CryptoCurrency[];
|
|
158
|
-
declare function getCryptoCurrencyById(id: string): CryptoCurrency;
|
|
159
|
-
declare const listCryptoCurrencies: typeof listCryptoCurrencies$1;
|
|
160
|
-
|
|
161
|
-
export { APIBearerTokenResponse, APIRequestResponse, BakeManifestOptions, type ConfigCatConfiguration, DEFAULT_SPAWN_WATCH_TIMEOUT_MINUTES, DEFAULT_VAULT_REMOTE_URL, DeployOptions, DestroyOptions, DevicesPool, GateAccount, GateTokenCurrency, GateTransaction, GateWhitelist, Interaction, Interactions, MVInstance, Manifest, ManifestAPIV2User, ManifestAccount, ManifestGroup, ManifestTransaction, Network, PoolOptions, PsdModel, RunnableOptions, TransportType, UTXOsPickingStrategy, UpgradeOptions, UserContext, WipeOptions, bakeManifest, createAPIDevice, createConfigCatEnvironment, createDevicesPool, createFaucet, createInteractions, createNetwork, createPledge, createSettlement, deleteConfigCatEnvironment, deploy, destroy, index as device, fetchERC20Tokens as fetchTokens, genSeed, getAuthTokens, getCryptoCurrencyById, getMVInstances, listCryptoCurrencies, send, setConfigCatFeatureFlagValues, setDeviceAPIEndpoint, upgrade, validateManifest, vaultCoins, wipeBackend };
|