@dfns/sdk 0.8.11 → 0.8.12

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.
@@ -1,19 +1,20 @@
1
- import { DfnsBaseApiOptions } from './types/generic';
1
+ import { AgreementsClient } from './generated/agreements';
2
+ import { AllocationsClient } from './generated/allocations';
2
3
  import { AuthClient } from './generated/auth';
4
+ import { CredentialSigner } from './signer';
3
5
  import { ExchangesClient } from './generated/exchanges';
4
6
  import { FeeSponsorsClient } from './generated/feeSponsors';
5
7
  import { KeysClient } from './generated/keys';
6
8
  import { NetworksClient } from './generated/networks';
9
+ import { PayoutsClient } from './generated/payouts';
7
10
  import { PermissionsClient } from './generated/permissions';
8
11
  import { PoliciesClient } from './generated/policies';
9
12
  import { SignersClient } from './generated/signers';
10
13
  import { StakingClient } from './generated/staking';
14
+ import { SwapsClient } from './generated/swaps';
11
15
  import { WalletsClient } from './generated/wallets';
12
16
  import { WebhooksClient } from './generated/webhooks';
13
- import { CredentialSigner } from './signer';
14
- import { SwapsClient } from './generated/swaps';
15
- import { AgreementsClient } from './generated/agreements';
16
- import { AllocationsClient } from './generated/allocations/client';
17
+ import { DfnsBaseApiOptions } from './types/generic';
17
18
  export type DfnsApiClientOptions = DfnsBaseApiOptions & {
18
19
  /** Needs to be specified to use any endpoint that required User Action Signing flow */
19
20
  signer?: CredentialSigner;
@@ -21,18 +22,19 @@ export type DfnsApiClientOptions = DfnsBaseApiOptions & {
21
22
  export declare class DfnsApiClient {
22
23
  private apiOptions;
23
24
  constructor(apiOptions: DfnsApiClientOptions);
25
+ get agreements(): AgreementsClient;
26
+ get allocations(): AllocationsClient;
24
27
  get auth(): AuthClient;
25
28
  get exchanges(): ExchangesClient;
26
29
  get feeSponsors(): FeeSponsorsClient;
27
30
  get keys(): KeysClient;
28
31
  get networks(): NetworksClient;
32
+ get payouts(): PayoutsClient;
29
33
  get permissions(): PermissionsClient;
30
34
  get policies(): PoliciesClient;
35
+ get signers(): SignersClient;
31
36
  get staking(): StakingClient;
32
- get allocations(): AllocationsClient;
33
37
  get swaps(): SwapsClient;
34
- get agreements(): AgreementsClient;
35
- get signers(): SignersClient;
36
38
  get wallets(): WalletsClient;
37
39
  get webhooks(): WebhooksClient;
38
40
  }
package/dfnsApiClient.js CHANGED
@@ -1,24 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DfnsApiClient = void 0;
4
+ const agreements_1 = require("./generated/agreements");
5
+ const allocations_1 = require("./generated/allocations");
4
6
  const auth_1 = require("./generated/auth");
5
7
  const exchanges_1 = require("./generated/exchanges");
6
8
  const feeSponsors_1 = require("./generated/feeSponsors");
7
9
  const keys_1 = require("./generated/keys");
8
10
  const networks_1 = require("./generated/networks");
11
+ const payouts_1 = require("./generated/payouts");
9
12
  const permissions_1 = require("./generated/permissions");
10
13
  const policies_1 = require("./generated/policies");
11
14
  const signers_1 = require("./generated/signers");
12
15
  const staking_1 = require("./generated/staking");
16
+ const swaps_1 = require("./generated/swaps");
13
17
  const wallets_1 = require("./generated/wallets");
14
18
  const webhooks_1 = require("./generated/webhooks");
15
- const swaps_1 = require("./generated/swaps");
16
- const agreements_1 = require("./generated/agreements");
17
- const client_1 = require("./generated/allocations/client");
18
19
  class DfnsApiClient {
19
20
  constructor(apiOptions) {
20
21
  this.apiOptions = apiOptions;
21
22
  }
23
+ get agreements() {
24
+ return new agreements_1.AgreementsClient(this.apiOptions);
25
+ }
26
+ get allocations() {
27
+ return new allocations_1.AllocationsClient(this.apiOptions);
28
+ }
22
29
  get auth() {
23
30
  return new auth_1.AuthClient(this.apiOptions);
24
31
  }
@@ -34,27 +41,24 @@ class DfnsApiClient {
34
41
  get networks() {
35
42
  return new networks_1.NetworksClient(this.apiOptions);
36
43
  }
44
+ get payouts() {
45
+ return new payouts_1.PayoutsClient(this.apiOptions);
46
+ }
37
47
  get permissions() {
38
48
  return new permissions_1.PermissionsClient(this.apiOptions);
39
49
  }
40
50
  get policies() {
41
51
  return new policies_1.PoliciesClient(this.apiOptions);
42
52
  }
53
+ get signers() {
54
+ return new signers_1.SignersClient(this.apiOptions);
55
+ }
43
56
  get staking() {
44
57
  return new staking_1.StakingClient(this.apiOptions);
45
58
  }
46
- get allocations() {
47
- return new client_1.AllocationsClient(this.apiOptions);
48
- }
49
59
  get swaps() {
50
60
  return new swaps_1.SwapsClient(this.apiOptions);
51
61
  }
52
- get agreements() {
53
- return new agreements_1.AgreementsClient(this.apiOptions);
54
- }
55
- get signers() {
56
- return new signers_1.SignersClient(this.apiOptions);
57
- }
58
62
  get wallets() {
59
63
  return new wallets_1.WalletsClient(this.apiOptions);
60
64
  }
@@ -1,26 +1,36 @@
1
- import { DfnsBaseApiOptions } from './types/generic';
1
+ import { DelegatedAgreementsClient } from './generated/agreements';
2
+ import { DelegatedAllocationsClient } from './generated/allocations';
2
3
  import { DelegatedAuthClient } from './generated/auth';
3
4
  import { DelegatedExchangesClient } from './generated/exchanges';
4
5
  import { DelegatedFeeSponsorsClient } from './generated/feeSponsors';
5
6
  import { DelegatedKeysClient } from './generated/keys';
6
7
  import { DelegatedNetworksClient } from './generated/networks';
8
+ import { DelegatedPayoutsClient } from './generated/payouts';
7
9
  import { DelegatedPermissionsClient } from './generated/permissions';
8
10
  import { DelegatedPoliciesClient } from './generated/policies';
9
11
  import { DelegatedSignersClient } from './generated/signers';
12
+ import { DelegatedStakingClient } from './generated/staking';
13
+ import { DelegatedSwapsClient } from './generated/swaps';
10
14
  import { DelegatedWalletsClient } from './generated/wallets';
11
15
  import { DelegatedWebhooksClient } from './generated/webhooks';
16
+ import { DfnsBaseApiOptions } from './types/generic';
12
17
  export type DfnsDelegatedApiClientOptions = DfnsBaseApiOptions;
13
18
  export declare class DfnsDelegatedApiClient {
14
19
  private apiOptions;
15
20
  constructor(apiOptions: DfnsDelegatedApiClientOptions);
21
+ get agreements(): DelegatedAgreementsClient;
22
+ get allocations(): DelegatedAllocationsClient;
16
23
  get auth(): DelegatedAuthClient;
17
24
  get exchanges(): DelegatedExchangesClient;
18
25
  get feeSponsors(): DelegatedFeeSponsorsClient;
19
26
  get keys(): DelegatedKeysClient;
20
27
  get networks(): DelegatedNetworksClient;
28
+ get payouts(): DelegatedPayoutsClient;
21
29
  get permissions(): DelegatedPermissionsClient;
22
30
  get policies(): DelegatedPoliciesClient;
31
+ get staking(): DelegatedStakingClient;
32
+ get swaps(): DelegatedSwapsClient;
33
+ get signers(): DelegatedSignersClient;
23
34
  get wallets(): DelegatedWalletsClient;
24
35
  get webhooks(): DelegatedWebhooksClient;
25
- get signers(): DelegatedSignersClient;
26
36
  }
@@ -1,20 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DfnsDelegatedApiClient = void 0;
4
+ const agreements_1 = require("./generated/agreements");
5
+ const allocations_1 = require("./generated/allocations");
4
6
  const auth_1 = require("./generated/auth");
5
7
  const exchanges_1 = require("./generated/exchanges");
6
8
  const feeSponsors_1 = require("./generated/feeSponsors");
7
9
  const keys_1 = require("./generated/keys");
8
10
  const networks_1 = require("./generated/networks");
11
+ const payouts_1 = require("./generated/payouts");
9
12
  const permissions_1 = require("./generated/permissions");
10
13
  const policies_1 = require("./generated/policies");
11
14
  const signers_1 = require("./generated/signers");
15
+ const staking_1 = require("./generated/staking");
16
+ const swaps_1 = require("./generated/swaps");
12
17
  const wallets_1 = require("./generated/wallets");
13
18
  const webhooks_1 = require("./generated/webhooks");
14
19
  class DfnsDelegatedApiClient {
15
20
  constructor(apiOptions) {
16
21
  this.apiOptions = apiOptions;
17
22
  }
23
+ get agreements() {
24
+ return new agreements_1.DelegatedAgreementsClient(this.apiOptions);
25
+ }
26
+ get allocations() {
27
+ return new allocations_1.DelegatedAllocationsClient(this.apiOptions);
28
+ }
18
29
  get auth() {
19
30
  return new auth_1.DelegatedAuthClient(this.apiOptions);
20
31
  }
@@ -30,20 +41,29 @@ class DfnsDelegatedApiClient {
30
41
  get networks() {
31
42
  return new networks_1.DelegatedNetworksClient(this.apiOptions);
32
43
  }
44
+ get payouts() {
45
+ return new payouts_1.DelegatedPayoutsClient(this.apiOptions);
46
+ }
33
47
  get permissions() {
34
48
  return new permissions_1.DelegatedPermissionsClient(this.apiOptions);
35
49
  }
36
50
  get policies() {
37
51
  return new policies_1.DelegatedPoliciesClient(this.apiOptions);
38
52
  }
53
+ get staking() {
54
+ return new staking_1.DelegatedStakingClient(this.apiOptions);
55
+ }
56
+ get swaps() {
57
+ return new swaps_1.DelegatedSwapsClient(this.apiOptions);
58
+ }
59
+ get signers() {
60
+ return new signers_1.DelegatedSignersClient(this.apiOptions);
61
+ }
39
62
  get wallets() {
40
63
  return new wallets_1.DelegatedWalletsClient(this.apiOptions);
41
64
  }
42
65
  get webhooks() {
43
66
  return new webhooks_1.DelegatedWebhooksClient(this.apiOptions);
44
67
  }
45
- get signers() {
46
- return new signers_1.DelegatedSignersClient(this.apiOptions);
47
- }
48
68
  }
49
69
  exports.DfnsDelegatedApiClient = DfnsDelegatedApiClient;
@@ -165,7 +165,7 @@ export type GenerateSignatureBody = {
165
165
  externalId?: string | undefined;
166
166
  } | {
167
167
  kind: "Transaction";
168
- /** The unsigned hex-encoded transaction. */
168
+ /** The unsigned hex encoded transaction or JSON object for compatible networks */
169
169
  transaction: string | {};
170
170
  network?: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "XrpLedger" | "XrpLedgerTestnet") | undefined;
171
171
  blockchainKind?: ("Algorand" | "Aptos" | "Bitcoin" | "BitcoinCash" | "Canton" | "Cardano" | "Concordium" | "Cosmos" | "Evm" | "Hedera" | "Icp" | "Iota" | "Kaspa" | "Near" | "Polymesh" | "Solana" | "Starknet" | "Stellar" | "Substrate" | "Sui" | "Tezos" | "Ton" | "Tron" | "Xrpl") | undefined;
@@ -374,7 +374,7 @@ export type GenerateSignatureResponse = {
374
374
  externalId?: string | undefined;
375
375
  } | {
376
376
  kind: "Transaction";
377
- /** The unsigned hex-encoded transaction. */
377
+ /** The unsigned hex encoded transaction or JSON object for compatible networks */
378
378
  transaction: string | {};
379
379
  network?: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "XrpLedger" | "XrpLedgerTestnet") | undefined;
380
380
  blockchainKind?: ("Algorand" | "Aptos" | "Bitcoin" | "BitcoinCash" | "Canton" | "Cardano" | "Concordium" | "Cosmos" | "Evm" | "Hedera" | "Icp" | "Iota" | "Kaspa" | "Near" | "Polymesh" | "Solana" | "Starknet" | "Stellar" | "Substrate" | "Sui" | "Tezos" | "Ton" | "Tron" | "Xrpl") | undefined;
@@ -668,7 +668,7 @@ export type GetSignatureResponse = {
668
668
  externalId?: string | undefined;
669
669
  } | {
670
670
  kind: "Transaction";
671
- /** The unsigned hex-encoded transaction. */
671
+ /** The unsigned hex encoded transaction or JSON object for compatible networks */
672
672
  transaction: string | {};
673
673
  network?: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "XrpLedger" | "XrpLedgerTestnet") | undefined;
674
674
  blockchainKind?: ("Algorand" | "Aptos" | "Bitcoin" | "BitcoinCash" | "Canton" | "Cardano" | "Concordium" | "Cosmos" | "Evm" | "Hedera" | "Icp" | "Iota" | "Kaspa" | "Near" | "Polymesh" | "Solana" | "Starknet" | "Stellar" | "Substrate" | "Sui" | "Tezos" | "Ton" | "Tron" | "Xrpl") | undefined;
@@ -1006,7 +1006,7 @@ export type ListSignaturesResponse = {
1006
1006
  externalId?: string | undefined;
1007
1007
  } | {
1008
1008
  kind: "Transaction";
1009
- /** The unsigned hex-encoded transaction. */
1009
+ /** The unsigned hex encoded transaction or JSON object for compatible networks */
1010
1010
  transaction: string | {};
1011
1011
  network?: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Concordium" | "ConcordiumTestnet" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "KusamaAssetHub" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Paseo" | "PaseoAssetHub" | "Polkadot" | "PolkadotAssetHub" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Starknet" | "StarknetSepolia" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "WestendAssetHub" | "XrpLedger" | "XrpLedgerTestnet") | undefined;
1012
1012
  blockchainKind?: ("Algorand" | "Aptos" | "Bitcoin" | "BitcoinCash" | "Canton" | "Cardano" | "Concordium" | "Cosmos" | "Evm" | "Hedera" | "Icp" | "Iota" | "Kaspa" | "Near" | "Polymesh" | "Solana" | "Starknet" | "Stellar" | "Substrate" | "Sui" | "Tezos" | "Ton" | "Tron" | "Xrpl") | undefined;
@@ -0,0 +1,10 @@
1
+ import { DfnsApiClientOptions } from '../../types/generic';
2
+ import * as T from './types';
3
+ export declare class PayoutsClient {
4
+ private apiOptions;
5
+ constructor(apiOptions: DfnsApiClientOptions);
6
+ createPayout(request: T.CreatePayoutRequest): Promise<T.CreatePayoutResponse>;
7
+ createPayoutAction(request: T.CreatePayoutActionRequest): Promise<T.CreatePayoutActionResponse>;
8
+ createPayoutQuote(request: T.CreatePayoutQuoteRequest): Promise<T.CreatePayoutQuoteResponse>;
9
+ getPayout(request: T.GetPayoutRequest): Promise<T.GetPayoutResponse>;
10
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* eslint @typescript-eslint/no-unused-vars: 0 */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.PayoutsClient = 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 PayoutsClient {
9
+ constructor(apiOptions) {
10
+ this.apiOptions = apiOptions;
11
+ }
12
+ async createPayout(request) {
13
+ const path = (0, url_1.buildPathAndQuery)('/payouts', {
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 createPayoutAction(request) {
25
+ const path = (0, url_1.buildPathAndQuery)('/payouts/:payoutId/action', {
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 createPayoutQuote(request) {
37
+ const path = (0, url_1.buildPathAndQuery)('/payouts/quote', {
38
+ path: request ?? {},
39
+ query: {},
40
+ });
41
+ const response = await (0, fetch_1.simpleFetch)(path, {
42
+ method: 'POST',
43
+ body: request.body,
44
+ apiOptions: this.apiOptions,
45
+ });
46
+ return response.json();
47
+ }
48
+ async getPayout(request) {
49
+ const path = (0, url_1.buildPathAndQuery)('/payouts/:payoutId', {
50
+ path: request ?? {},
51
+ query: {},
52
+ });
53
+ const response = await (0, fetch_1.simpleFetch)(path, {
54
+ method: 'GET',
55
+ apiOptions: this.apiOptions,
56
+ });
57
+ return response.json();
58
+ }
59
+ }
60
+ exports.PayoutsClient = PayoutsClient;
@@ -0,0 +1,13 @@
1
+ import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi';
2
+ import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
3
+ import * as T from './types';
4
+ export declare class DelegatedPayoutsClient {
5
+ private apiOptions;
6
+ constructor(apiOptions: DfnsDelegatedApiClientOptions);
7
+ createPayoutInit(request: T.CreatePayoutRequest): Promise<UserActionChallengeResponse>;
8
+ createPayoutComplete(request: T.CreatePayoutRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePayoutResponse>;
9
+ createPayoutActionInit(request: T.CreatePayoutActionRequest): Promise<UserActionChallengeResponse>;
10
+ createPayoutActionComplete(request: T.CreatePayoutActionRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreatePayoutActionResponse>;
11
+ createPayoutQuote(request: T.CreatePayoutQuoteRequest): Promise<T.CreatePayoutQuoteResponse>;
12
+ getPayout(request: T.GetPayoutRequest): Promise<T.GetPayoutResponse>;
13
+ }
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DelegatedPayoutsClient = void 0;
4
+ const baseAuthApi_1 = require("../../baseAuthApi");
5
+ const fetch_1 = require("../../utils/fetch");
6
+ const url_1 = require("../../utils/url");
7
+ class DelegatedPayoutsClient {
8
+ constructor(apiOptions) {
9
+ this.apiOptions = apiOptions;
10
+ }
11
+ async createPayoutInit(request) {
12
+ const path = (0, url_1.buildPathAndQuery)('/payouts', {
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 createPayoutComplete(request, signedChallenge) {
25
+ const path = (0, url_1.buildPathAndQuery)('/payouts', {
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 createPayoutActionInit(request) {
39
+ const path = (0, url_1.buildPathAndQuery)('/payouts/:payoutId/action', {
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 createPayoutActionComplete(request, signedChallenge) {
52
+ const path = (0, url_1.buildPathAndQuery)('/payouts/:payoutId/action', {
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 createPayoutQuote(request) {
66
+ const path = (0, url_1.buildPathAndQuery)('/payouts/quote', {
67
+ path: request ?? {},
68
+ query: {},
69
+ });
70
+ const response = await (0, fetch_1.simpleFetch)(path, {
71
+ method: 'POST',
72
+ body: request.body,
73
+ apiOptions: this.apiOptions,
74
+ });
75
+ return response.json();
76
+ }
77
+ async getPayout(request) {
78
+ const path = (0, url_1.buildPathAndQuery)('/payouts/:payoutId', {
79
+ path: request ?? {},
80
+ query: {},
81
+ });
82
+ const response = await (0, fetch_1.simpleFetch)(path, {
83
+ method: 'GET',
84
+ apiOptions: this.apiOptions,
85
+ });
86
+ return response.json();
87
+ }
88
+ }
89
+ exports.DelegatedPayoutsClient = DelegatedPayoutsClient;
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './client';
3
+ export * from './delegatedClient';
@@ -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);