@dfns/sdk 0.7.14-rc.0 → 0.7.15-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generated/auth/client.d.ts +2 -2
- package/generated/auth/client.js +2 -2
- package/generated/auth/delegatedClient.d.ts +2 -2
- package/generated/auth/delegatedClient.js +2 -2
- package/generated/auth/types.d.ts +56 -23
- package/generated/exchanges/types.d.ts +12 -0
- package/generated/feeSponsors/types.d.ts +51 -4
- package/generated/keys/types.d.ts +15 -7
- package/generated/networks/types.d.ts +9 -0
- package/generated/permissions/types.d.ts +2 -2
- package/generated/policies/types.d.ts +90 -12
- package/generated/signers/client.d.ts +1 -0
- package/generated/signers/client.js +11 -0
- package/generated/signers/delegatedClient.d.ts +1 -0
- package/generated/signers/delegatedClient.js +11 -0
- package/generated/signers/types.d.ts +8 -0
- package/generated/staking/types.d.ts +6 -0
- package/generated/swaps/types.d.ts +118 -0
- package/generated/wallets/types.d.ts +63 -7
- package/generated/yields/client.d.ts +11 -0
- package/generated/yields/client.js +70 -0
- package/generated/yields/delegatedClient.d.ts +14 -0
- package/generated/yields/delegatedClient.js +99 -0
- package/generated/yields/index.d.ts +3 -0
- package/generated/yields/index.js +19 -0
- package/generated/yields/types.d.ts +488 -0
- package/generated/yields/types.js +2 -0
- package/package.json +1 -1
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
export type AcceptOfferParams = {
|
|
2
|
+
/** Wallet id. */
|
|
2
3
|
walletId: string;
|
|
4
|
+
/** Offer id. */
|
|
3
5
|
offerId: string;
|
|
4
6
|
};
|
|
5
7
|
export type AcceptOfferResponse = {
|
|
8
|
+
/** Offer id. */
|
|
6
9
|
id: string;
|
|
10
|
+
/** Organization id. */
|
|
7
11
|
orgId: string;
|
|
12
|
+
/** Wallet id. */
|
|
8
13
|
walletId: string;
|
|
9
14
|
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
10
15
|
kind: "Native" | "Aip21" | "Asa" | "Coin" | "Erc20" | "Erc721" | "Asset" | "Hip17" | "Hts" | "Sep41" | "Spl" | "Spl2022" | "Tep74" | "Trc10" | "Trc20" | "Trc721";
|
|
@@ -90,6 +95,10 @@ export type BroadcastTransactionBody = {
|
|
|
90
95
|
decision: "Accept" | "Reject";
|
|
91
96
|
/** A unique ID from your system. It can be leveraged to be used as an idempotency key (read more [here](https://docs.dfns.co/api-reference/idempotency)). */
|
|
92
97
|
externalId?: string | undefined;
|
|
98
|
+
} | {
|
|
99
|
+
kind: "TransferPreapproval";
|
|
100
|
+
/** A unique ID from your system. It can be leveraged to be used as an idempotency key (read more [here](https://docs.dfns.co/api-reference/idempotency)). */
|
|
101
|
+
externalId?: string | undefined;
|
|
93
102
|
};
|
|
94
103
|
export type BroadcastTransactionParams = {
|
|
95
104
|
walletId: string;
|
|
@@ -165,6 +174,10 @@ export type BroadcastTransactionResponse = {
|
|
|
165
174
|
decision: "Accept" | "Reject";
|
|
166
175
|
/** A unique ID from your system. It can be leveraged to be used as an idempotency key (read more [here](https://docs.dfns.co/api-reference/idempotency)). */
|
|
167
176
|
externalId?: string | undefined;
|
|
177
|
+
} | {
|
|
178
|
+
kind: "TransferPreapproval";
|
|
179
|
+
/** A unique ID from your system. It can be leveraged to be used as an idempotency key (read more [here](https://docs.dfns.co/api-reference/idempotency)). */
|
|
180
|
+
externalId?: string | undefined;
|
|
168
181
|
};
|
|
169
182
|
status: "Pending" | "Executing" | "Broadcasted" | "Confirmed" | "Failed" | "Rejected";
|
|
170
183
|
reason?: string | undefined;
|
|
@@ -193,6 +206,8 @@ export type CreateWalletBody = {
|
|
|
193
206
|
scheme?: ("DH" | "ECDSA" | "EdDSA" | "Schnorr") | undefined;
|
|
194
207
|
/** Use this to specify the new key curve for networks that support multiple key formats. */
|
|
195
208
|
curve?: ("ed25519" | "secp256k1" | "stark") | undefined;
|
|
209
|
+
/** Use this to specify the key store the key material is saved to. */
|
|
210
|
+
storeId?: string | undefined;
|
|
196
211
|
} | undefined;
|
|
197
212
|
/** ID of the end user to delegate this wallet to. The wallet will only be usable by the end user. More info [here](https://docs.dfns.co/advanced/delegated-signing). */
|
|
198
213
|
delegateTo?: string | undefined;
|
|
@@ -214,6 +229,7 @@ export type CreateWalletResponse = {
|
|
|
214
229
|
address?: string | undefined;
|
|
215
230
|
/** Details about the key underlying the wallet. */
|
|
216
231
|
signingKey: {
|
|
232
|
+
/** Key id. */
|
|
217
233
|
id: string;
|
|
218
234
|
/** Key scheme. */
|
|
219
235
|
scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
|
|
@@ -227,6 +243,8 @@ export type CreateWalletResponse = {
|
|
|
227
243
|
status: "Active" | "Archived";
|
|
228
244
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
|
|
229
245
|
dateCreated: string;
|
|
246
|
+
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
|
|
247
|
+
dateDeleted?: string | undefined;
|
|
230
248
|
/** Wallet nickname. */
|
|
231
249
|
name?: string | undefined;
|
|
232
250
|
/** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
|
|
@@ -257,7 +275,7 @@ export type DelegateWalletRequest = DelegateWalletParams & {
|
|
|
257
275
|
export type ExportWalletBody = {
|
|
258
276
|
encryptionKey: string;
|
|
259
277
|
supportedSchemes: {
|
|
260
|
-
protocol: "
|
|
278
|
+
protocol: "CGGMP24" | "FROST" | "FROST_BITCOIN" | "GLOW20_DH" | "KU23";
|
|
261
279
|
curve: "ed25519" | "secp256k1" | "stark";
|
|
262
280
|
}[];
|
|
263
281
|
};
|
|
@@ -266,7 +284,7 @@ export type ExportWalletParams = {
|
|
|
266
284
|
};
|
|
267
285
|
export type ExportWalletResponse = {
|
|
268
286
|
publicKey: string;
|
|
269
|
-
protocol: "
|
|
287
|
+
protocol: "CGGMP24" | "FROST" | "FROST_BITCOIN" | "GLOW20_DH" | "KU23";
|
|
270
288
|
curve: "ed25519" | "secp256k1" | "stark";
|
|
271
289
|
/** The TSS threshold of the wallet private signing key shares */
|
|
272
290
|
minSigners: number;
|
|
@@ -426,7 +444,7 @@ export type GenerateSignatureBody = {
|
|
|
426
444
|
}
|
|
427
445
|
}
|
|
428
446
|
```
|
|
429
|
-
|
|
447
|
+
*/
|
|
430
448
|
payload: string | {};
|
|
431
449
|
network?: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet") | undefined;
|
|
432
450
|
blockchainKind?: ("Algorand" | "Aptos" | "Bitcoin" | "BitcoinCash" | "Canton" | "Cardano" | "Cosmos" | "Evm" | "Hedera" | "Icp" | "Iota" | "Kadena" | "Kaspa" | "Near" | "Polymesh" | "Solana" | "Stellar" | "Substrate" | "Sui" | "Tezos" | "Ton" | "Tron" | "Xrpl") | undefined;
|
|
@@ -599,7 +617,7 @@ export type GenerateSignatureResponse = {
|
|
|
599
617
|
}
|
|
600
618
|
}
|
|
601
619
|
```
|
|
602
|
-
|
|
620
|
+
*/
|
|
603
621
|
payload: string | {};
|
|
604
622
|
network?: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet") | undefined;
|
|
605
623
|
blockchainKind?: ("Algorand" | "Aptos" | "Bitcoin" | "BitcoinCash" | "Canton" | "Cardano" | "Cosmos" | "Evm" | "Hedera" | "Icp" | "Iota" | "Kadena" | "Kaspa" | "Near" | "Polymesh" | "Solana" | "Stellar" | "Substrate" | "Sui" | "Tezos" | "Ton" | "Tron" | "Xrpl") | undefined;
|
|
@@ -647,12 +665,17 @@ export type GenerateSignatureRequest = GenerateSignatureParams & {
|
|
|
647
665
|
body: GenerateSignatureBody;
|
|
648
666
|
};
|
|
649
667
|
export type GetOfferParams = {
|
|
668
|
+
/** Wallet id. */
|
|
650
669
|
walletId: string;
|
|
670
|
+
/** Offer id. */
|
|
651
671
|
offerId: string;
|
|
652
672
|
};
|
|
653
673
|
export type GetOfferResponse = {
|
|
674
|
+
/** Offer id. */
|
|
654
675
|
id: string;
|
|
676
|
+
/** Organization id. */
|
|
655
677
|
orgId: string;
|
|
678
|
+
/** Wallet id. */
|
|
656
679
|
walletId: string;
|
|
657
680
|
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
658
681
|
kind: "Native" | "Aip21" | "Asa" | "Coin" | "Erc20" | "Erc721" | "Asset" | "Hip17" | "Hts" | "Sep41" | "Spl" | "Spl2022" | "Tep74" | "Trc10" | "Trc20" | "Trc721";
|
|
@@ -831,7 +854,7 @@ export type GetSignatureResponse = {
|
|
|
831
854
|
}
|
|
832
855
|
}
|
|
833
856
|
```
|
|
834
|
-
|
|
857
|
+
*/
|
|
835
858
|
payload: string | {};
|
|
836
859
|
network?: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet") | undefined;
|
|
837
860
|
blockchainKind?: ("Algorand" | "Aptos" | "Bitcoin" | "BitcoinCash" | "Canton" | "Cardano" | "Cosmos" | "Evm" | "Hedera" | "Icp" | "Iota" | "Kadena" | "Kaspa" | "Near" | "Polymesh" | "Solana" | "Stellar" | "Substrate" | "Sui" | "Tezos" | "Ton" | "Tron" | "Xrpl") | undefined;
|
|
@@ -950,6 +973,10 @@ export type GetTransactionResponse = {
|
|
|
950
973
|
decision: "Accept" | "Reject";
|
|
951
974
|
/** A unique ID from your system. It can be leveraged to be used as an idempotency key (read more [here](https://docs.dfns.co/api-reference/idempotency)). */
|
|
952
975
|
externalId?: string | undefined;
|
|
976
|
+
} | {
|
|
977
|
+
kind: "TransferPreapproval";
|
|
978
|
+
/** A unique ID from your system. It can be leveraged to be used as an idempotency key (read more [here](https://docs.dfns.co/api-reference/idempotency)). */
|
|
979
|
+
externalId?: string | undefined;
|
|
953
980
|
};
|
|
954
981
|
status: "Pending" | "Executing" | "Broadcasted" | "Confirmed" | "Failed" | "Rejected";
|
|
955
982
|
reason?: string | undefined;
|
|
@@ -1422,6 +1449,7 @@ export type GetWalletResponse = {
|
|
|
1422
1449
|
address?: string | undefined;
|
|
1423
1450
|
/** Details about the key underlying the wallet. */
|
|
1424
1451
|
signingKey: {
|
|
1452
|
+
/** Key id. */
|
|
1425
1453
|
id: string;
|
|
1426
1454
|
/** Key scheme. */
|
|
1427
1455
|
scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
|
|
@@ -1435,6 +1463,8 @@ export type GetWalletResponse = {
|
|
|
1435
1463
|
status: "Active" | "Archived";
|
|
1436
1464
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
|
|
1437
1465
|
dateCreated: string;
|
|
1466
|
+
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
|
|
1467
|
+
dateDeleted?: string | undefined;
|
|
1438
1468
|
/** Wallet nickname. */
|
|
1439
1469
|
name?: string | undefined;
|
|
1440
1470
|
/** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
|
|
@@ -2166,7 +2196,7 @@ export type GetWalletNftsRequest = GetWalletNftsParams;
|
|
|
2166
2196
|
export type ImportWalletBody = {
|
|
2167
2197
|
name?: string | undefined;
|
|
2168
2198
|
curve: "ed25519" | "secp256k1" | "stark";
|
|
2169
|
-
protocol: "
|
|
2199
|
+
protocol: ("CGGMP24" | "FROST" | "FROST_BITCOIN" | "GLOW20_DH" | "KU23") | "CGGMP21";
|
|
2170
2200
|
minSigners: number;
|
|
2171
2201
|
encryptedKeyShares: {
|
|
2172
2202
|
signerId: string;
|
|
@@ -2186,6 +2216,7 @@ export type ImportWalletResponse = {
|
|
|
2186
2216
|
address?: string | undefined;
|
|
2187
2217
|
/** Details about the key underlying the wallet. */
|
|
2188
2218
|
signingKey: {
|
|
2219
|
+
/** Key id. */
|
|
2189
2220
|
id: string;
|
|
2190
2221
|
/** Key scheme. */
|
|
2191
2222
|
scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
|
|
@@ -2199,6 +2230,8 @@ export type ImportWalletResponse = {
|
|
|
2199
2230
|
status: "Active" | "Archived";
|
|
2200
2231
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
|
|
2201
2232
|
dateCreated: string;
|
|
2233
|
+
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
|
|
2234
|
+
dateDeleted?: string | undefined;
|
|
2202
2235
|
/** Wallet nickname. */
|
|
2203
2236
|
name?: string | undefined;
|
|
2204
2237
|
/** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
|
|
@@ -2214,16 +2247,23 @@ export type ImportWalletRequest = {
|
|
|
2214
2247
|
body: ImportWalletBody;
|
|
2215
2248
|
};
|
|
2216
2249
|
export type ListOffersParams = {
|
|
2250
|
+
/** Wallet id. */
|
|
2217
2251
|
walletId: string;
|
|
2218
2252
|
};
|
|
2219
2253
|
export type ListOffersQuery = {
|
|
2254
|
+
/** Maximum number of items to return. */
|
|
2220
2255
|
limit?: number | undefined;
|
|
2256
|
+
/** Opaque token used to retrieve the next page. Returned as `nextPageToken` from the previous request. */
|
|
2221
2257
|
paginationToken?: string | undefined;
|
|
2222
2258
|
};
|
|
2223
2259
|
export type ListOffersResponse = {
|
|
2260
|
+
/** Current page items. */
|
|
2224
2261
|
items: {
|
|
2262
|
+
/** Offer id. */
|
|
2225
2263
|
id: string;
|
|
2264
|
+
/** Organization id. */
|
|
2226
2265
|
orgId: string;
|
|
2266
|
+
/** Wallet id. */
|
|
2227
2267
|
walletId: string;
|
|
2228
2268
|
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
2229
2269
|
kind: "Native" | "Aip21" | "Asa" | "Coin" | "Erc20" | "Erc721" | "Asset" | "Hip17" | "Hts" | "Sep41" | "Spl" | "Spl2022" | "Tep74" | "Trc10" | "Trc20" | "Trc721";
|
|
@@ -2245,6 +2285,7 @@ export type ListOffersResponse = {
|
|
|
2245
2285
|
timestamp: string;
|
|
2246
2286
|
expiresAt?: string | undefined;
|
|
2247
2287
|
}[];
|
|
2288
|
+
/** token to use as `paginationToken` to request the next page. */
|
|
2248
2289
|
nextPageToken?: string | undefined;
|
|
2249
2290
|
};
|
|
2250
2291
|
export type ListOffersRequest = ListOffersParams & {
|
|
@@ -2441,7 +2482,7 @@ export type ListSignaturesResponse = {
|
|
|
2441
2482
|
}
|
|
2442
2483
|
}
|
|
2443
2484
|
```
|
|
2444
|
-
|
|
2485
|
+
*/
|
|
2445
2486
|
payload: string | {};
|
|
2446
2487
|
network?: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet") | undefined;
|
|
2447
2488
|
blockchainKind?: ("Algorand" | "Aptos" | "Bitcoin" | "BitcoinCash" | "Canton" | "Cardano" | "Cosmos" | "Evm" | "Hedera" | "Icp" | "Iota" | "Kadena" | "Kaspa" | "Near" | "Polymesh" | "Solana" | "Stellar" | "Substrate" | "Sui" | "Tezos" | "Ton" | "Tron" | "Xrpl") | undefined;
|
|
@@ -2569,6 +2610,10 @@ export type ListTransactionsResponse = {
|
|
|
2569
2610
|
decision: "Accept" | "Reject";
|
|
2570
2611
|
/** A unique ID from your system. It can be leveraged to be used as an idempotency key (read more [here](https://docs.dfns.co/api-reference/idempotency)). */
|
|
2571
2612
|
externalId?: string | undefined;
|
|
2613
|
+
} | {
|
|
2614
|
+
kind: "TransferPreapproval";
|
|
2615
|
+
/** A unique ID from your system. It can be leveraged to be used as an idempotency key (read more [here](https://docs.dfns.co/api-reference/idempotency)). */
|
|
2616
|
+
externalId?: string | undefined;
|
|
2572
2617
|
};
|
|
2573
2618
|
status: "Pending" | "Executing" | "Broadcasted" | "Confirmed" | "Failed" | "Rejected";
|
|
2574
2619
|
reason?: string | undefined;
|
|
@@ -3061,6 +3106,7 @@ export type ListWalletsResponse = {
|
|
|
3061
3106
|
address?: string | undefined;
|
|
3062
3107
|
/** Details about the key underlying the wallet. */
|
|
3063
3108
|
signingKey: {
|
|
3109
|
+
/** Key id. */
|
|
3064
3110
|
id: string;
|
|
3065
3111
|
/** Key scheme. */
|
|
3066
3112
|
scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
|
|
@@ -3074,6 +3120,8 @@ export type ListWalletsResponse = {
|
|
|
3074
3120
|
status: "Active" | "Archived";
|
|
3075
3121
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
|
|
3076
3122
|
dateCreated: string;
|
|
3123
|
+
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
|
|
3124
|
+
dateDeleted?: string | undefined;
|
|
3077
3125
|
/** Wallet nickname. */
|
|
3078
3126
|
name?: string | undefined;
|
|
3079
3127
|
/** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
|
|
@@ -3091,12 +3139,17 @@ export type ListWalletsRequest = {
|
|
|
3091
3139
|
query?: ListWalletsQuery;
|
|
3092
3140
|
};
|
|
3093
3141
|
export type RejectOfferParams = {
|
|
3142
|
+
/** Wallet id. */
|
|
3094
3143
|
walletId: string;
|
|
3144
|
+
/** Offer id. */
|
|
3095
3145
|
offerId: string;
|
|
3096
3146
|
};
|
|
3097
3147
|
export type RejectOfferResponse = {
|
|
3148
|
+
/** Offer id. */
|
|
3098
3149
|
id: string;
|
|
3150
|
+
/** Organization id. */
|
|
3099
3151
|
orgId: string;
|
|
3152
|
+
/** Wallet id. */
|
|
3100
3153
|
walletId: string;
|
|
3101
3154
|
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
3102
3155
|
kind: "Native" | "Aip21" | "Asa" | "Coin" | "Erc20" | "Erc721" | "Asset" | "Hip17" | "Hts" | "Sep41" | "Spl" | "Spl2022" | "Tep74" | "Trc10" | "Trc20" | "Trc721";
|
|
@@ -4017,6 +4070,7 @@ export type UpdateWalletResponse = {
|
|
|
4017
4070
|
address?: string | undefined;
|
|
4018
4071
|
/** Details about the key underlying the wallet. */
|
|
4019
4072
|
signingKey: {
|
|
4073
|
+
/** Key id. */
|
|
4020
4074
|
id: string;
|
|
4021
4075
|
/** Key scheme. */
|
|
4022
4076
|
scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
|
|
@@ -4030,6 +4084,8 @@ export type UpdateWalletResponse = {
|
|
|
4030
4084
|
status: "Active" | "Archived";
|
|
4031
4085
|
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
|
|
4032
4086
|
dateCreated: string;
|
|
4087
|
+
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was deleted. */
|
|
4088
|
+
dateDeleted?: string | undefined;
|
|
4033
4089
|
/** Wallet nickname. */
|
|
4034
4090
|
name?: string | undefined;
|
|
4035
4091
|
/** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../types/generic';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class YieldsClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
createYield(request: T.CreateYieldRequest): Promise<T.CreateYieldResponse>;
|
|
7
|
+
createYieldAction(request: T.CreateYieldActionRequest): Promise<T.CreateYieldActionResponse>;
|
|
8
|
+
getYield(request: T.GetYieldRequest): Promise<T.GetYieldResponse>;
|
|
9
|
+
listYieldActions(request: T.ListYieldActionsRequest): Promise<T.ListYieldActionsResponse>;
|
|
10
|
+
listYields(request?: T.ListYieldsRequest): Promise<T.ListYieldsResponse>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint @typescript-eslint/no-unused-vars: 0 */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.YieldsClient = void 0;
|
|
5
|
+
const fetch_1 = require("../../utils/fetch");
|
|
6
|
+
const userActionFetch_1 = require("../../utils/userActionFetch");
|
|
7
|
+
const url_1 = require("../../utils/url");
|
|
8
|
+
class YieldsClient {
|
|
9
|
+
constructor(apiOptions) {
|
|
10
|
+
this.apiOptions = apiOptions;
|
|
11
|
+
}
|
|
12
|
+
async createYield(request) {
|
|
13
|
+
const path = (0, url_1.buildPathAndQuery)('/yields', {
|
|
14
|
+
path: request ?? {},
|
|
15
|
+
query: {},
|
|
16
|
+
});
|
|
17
|
+
const response = await (0, userActionFetch_1.userActionFetch)(path, {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
body: request.body,
|
|
20
|
+
apiOptions: this.apiOptions,
|
|
21
|
+
});
|
|
22
|
+
return response.json();
|
|
23
|
+
}
|
|
24
|
+
async createYieldAction(request) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
|
|
26
|
+
path: request ?? {},
|
|
27
|
+
query: {},
|
|
28
|
+
});
|
|
29
|
+
const response = await (0, userActionFetch_1.userActionFetch)(path, {
|
|
30
|
+
method: 'POST',
|
|
31
|
+
body: request.body,
|
|
32
|
+
apiOptions: this.apiOptions,
|
|
33
|
+
});
|
|
34
|
+
return response.json();
|
|
35
|
+
}
|
|
36
|
+
async getYield(request) {
|
|
37
|
+
const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId', {
|
|
38
|
+
path: request ?? {},
|
|
39
|
+
query: {},
|
|
40
|
+
});
|
|
41
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
42
|
+
method: 'GET',
|
|
43
|
+
apiOptions: this.apiOptions,
|
|
44
|
+
});
|
|
45
|
+
return response.json();
|
|
46
|
+
}
|
|
47
|
+
async listYieldActions(request) {
|
|
48
|
+
const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
|
|
49
|
+
path: request ?? {},
|
|
50
|
+
query: request.query ?? {},
|
|
51
|
+
});
|
|
52
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
53
|
+
method: 'GET',
|
|
54
|
+
apiOptions: this.apiOptions,
|
|
55
|
+
});
|
|
56
|
+
return response.json();
|
|
57
|
+
}
|
|
58
|
+
async listYields(request) {
|
|
59
|
+
const path = (0, url_1.buildPathAndQuery)('/yields', {
|
|
60
|
+
path: request ?? {},
|
|
61
|
+
query: request?.query ?? {},
|
|
62
|
+
});
|
|
63
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
64
|
+
method: 'GET',
|
|
65
|
+
apiOptions: this.apiOptions,
|
|
66
|
+
});
|
|
67
|
+
return response.json();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.YieldsClient = YieldsClient;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi';
|
|
2
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
|
|
3
|
+
import * as T from './types';
|
|
4
|
+
export declare class DelegatedYieldsClient {
|
|
5
|
+
private apiOptions;
|
|
6
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
7
|
+
createYieldInit(request: T.CreateYieldRequest): Promise<UserActionChallengeResponse>;
|
|
8
|
+
createYieldComplete(request: T.CreateYieldRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateYieldResponse>;
|
|
9
|
+
createYieldActionInit(request: T.CreateYieldActionRequest): Promise<UserActionChallengeResponse>;
|
|
10
|
+
createYieldActionComplete(request: T.CreateYieldActionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateYieldActionResponse>;
|
|
11
|
+
getYield(request: T.GetYieldRequest): Promise<T.GetYieldResponse>;
|
|
12
|
+
listYieldActions(request: T.ListYieldActionsRequest): Promise<T.ListYieldActionsResponse>;
|
|
13
|
+
listYields(request?: T.ListYieldsRequest): Promise<T.ListYieldsResponse>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelegatedYieldsClient = void 0;
|
|
4
|
+
const baseAuthApi_1 = require("../../baseAuthApi");
|
|
5
|
+
const fetch_1 = require("../../utils/fetch");
|
|
6
|
+
const url_1 = require("../../utils/url");
|
|
7
|
+
class DelegatedYieldsClient {
|
|
8
|
+
constructor(apiOptions) {
|
|
9
|
+
this.apiOptions = apiOptions;
|
|
10
|
+
}
|
|
11
|
+
async createYieldInit(request) {
|
|
12
|
+
const path = (0, url_1.buildPathAndQuery)('/yields', {
|
|
13
|
+
path: request ?? {},
|
|
14
|
+
query: {},
|
|
15
|
+
});
|
|
16
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
17
|
+
userActionHttpMethod: 'POST',
|
|
18
|
+
userActionHttpPath: path,
|
|
19
|
+
userActionPayload: JSON.stringify(request.body),
|
|
20
|
+
userActionServerKind: 'Api',
|
|
21
|
+
}, this.apiOptions);
|
|
22
|
+
return challenge;
|
|
23
|
+
}
|
|
24
|
+
async createYieldComplete(request, signedChallenge) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/yields', {
|
|
26
|
+
path: request ?? {},
|
|
27
|
+
query: {},
|
|
28
|
+
});
|
|
29
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
30
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
31
|
+
method: 'POST',
|
|
32
|
+
body: request.body,
|
|
33
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
34
|
+
apiOptions: this.apiOptions,
|
|
35
|
+
});
|
|
36
|
+
return response.json();
|
|
37
|
+
}
|
|
38
|
+
async createYieldActionInit(request) {
|
|
39
|
+
const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
|
|
40
|
+
path: request ?? {},
|
|
41
|
+
query: {},
|
|
42
|
+
});
|
|
43
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
44
|
+
userActionHttpMethod: 'POST',
|
|
45
|
+
userActionHttpPath: path,
|
|
46
|
+
userActionPayload: JSON.stringify(request.body),
|
|
47
|
+
userActionServerKind: 'Api',
|
|
48
|
+
}, this.apiOptions);
|
|
49
|
+
return challenge;
|
|
50
|
+
}
|
|
51
|
+
async createYieldActionComplete(request, signedChallenge) {
|
|
52
|
+
const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
|
|
53
|
+
path: request ?? {},
|
|
54
|
+
query: {},
|
|
55
|
+
});
|
|
56
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
57
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
58
|
+
method: 'POST',
|
|
59
|
+
body: request.body,
|
|
60
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
61
|
+
apiOptions: this.apiOptions,
|
|
62
|
+
});
|
|
63
|
+
return response.json();
|
|
64
|
+
}
|
|
65
|
+
async getYield(request) {
|
|
66
|
+
const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId', {
|
|
67
|
+
path: request ?? {},
|
|
68
|
+
query: {},
|
|
69
|
+
});
|
|
70
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
71
|
+
method: 'GET',
|
|
72
|
+
apiOptions: this.apiOptions,
|
|
73
|
+
});
|
|
74
|
+
return response.json();
|
|
75
|
+
}
|
|
76
|
+
async listYieldActions(request) {
|
|
77
|
+
const path = (0, url_1.buildPathAndQuery)('/yields/:yieldId/actions', {
|
|
78
|
+
path: request ?? {},
|
|
79
|
+
query: request.query ?? {},
|
|
80
|
+
});
|
|
81
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
82
|
+
method: 'GET',
|
|
83
|
+
apiOptions: this.apiOptions,
|
|
84
|
+
});
|
|
85
|
+
return response.json();
|
|
86
|
+
}
|
|
87
|
+
async listYields(request) {
|
|
88
|
+
const path = (0, url_1.buildPathAndQuery)('/yields', {
|
|
89
|
+
path: request ?? {},
|
|
90
|
+
query: request?.query ?? {},
|
|
91
|
+
});
|
|
92
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
93
|
+
method: 'GET',
|
|
94
|
+
apiOptions: this.apiOptions,
|
|
95
|
+
});
|
|
96
|
+
return response.json();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.DelegatedYieldsClient = DelegatedYieldsClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
19
|
+
__exportStar(require("./delegatedClient"), exports);
|