@dfns/sdk 0.8.11 → 0.8.13

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.
Files changed (37) hide show
  1. package/dfnsApiClient.d.ts +10 -8
  2. package/dfnsApiClient.js +16 -12
  3. package/dfnsDelegatedApiClient.d.ts +12 -2
  4. package/dfnsDelegatedApiClient.js +23 -3
  5. package/generated/auth/client.js +2 -2
  6. package/generated/auth/delegatedClient.js +4 -4
  7. package/generated/auth/types.d.ts +14 -2
  8. package/generated/keys/types.d.ts +4 -4
  9. package/generated/networks/types.d.ts +14 -1
  10. package/generated/payouts/client.d.ts +11 -0
  11. package/generated/payouts/client.js +71 -0
  12. package/generated/payouts/delegatedClient.d.ts +14 -0
  13. package/generated/payouts/delegatedClient.js +100 -0
  14. package/generated/payouts/index.d.ts +3 -0
  15. package/generated/payouts/index.js +19 -0
  16. package/generated/payouts/types.d.ts +427 -0
  17. package/generated/payouts/types.js +2 -0
  18. package/generated/permissions/client.js +1 -1
  19. package/generated/permissions/delegatedClient.js +1 -1
  20. package/generated/permissions/types.d.ts +95 -4
  21. package/generated/policies/types.d.ts +234 -30
  22. package/generated/swaps/types.d.ts +6 -0
  23. package/generated/wallets/types.d.ts +53 -45
  24. package/generated/webhooks/types.d.ts +9 -9
  25. package/package.json +1 -1
  26. package/types/agreements.d.ts +1 -0
  27. package/types/agreements.js +17 -0
  28. package/types/allocations.d.ts +1 -0
  29. package/types/allocations.js +17 -0
  30. package/types/payouts.d.ts +1 -0
  31. package/types/payouts.js +17 -0
  32. package/types/staking.d.ts +1 -0
  33. package/types/staking.js +17 -0
  34. package/types/swaps.d.ts +1 -0
  35. package/types/swaps.js +17 -0
  36. package/utils/url.d.ts +1 -1
  37. package/utils/url.js +11 -2
@@ -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;
@@ -72,7 +72,7 @@ class AuthClient {
72
72
  async archiveServiceAccount(request) {
73
73
  const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
74
74
  path: request ?? {},
75
- query: {},
75
+ query: request.query ?? {},
76
76
  });
77
77
  const response = await (0, userActionFetch_1.userActionFetch)(path, {
78
78
  method: 'DELETE',
@@ -336,7 +336,7 @@ class AuthClient {
336
336
  });
337
337
  const response = await (0, userActionFetch_1.userActionFetch)(path, {
338
338
  method: 'PUT',
339
- body: {},
339
+ body: request.body,
340
340
  apiOptions: this.apiOptions,
341
341
  });
342
342
  return response.json();
@@ -146,7 +146,7 @@ class DelegatedAuthClient {
146
146
  async archiveServiceAccountInit(request) {
147
147
  const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
148
148
  path: request ?? {},
149
- query: {},
149
+ query: request.query ?? {},
150
150
  });
151
151
  const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
152
152
  userActionHttpMethod: 'DELETE',
@@ -159,7 +159,7 @@ class DelegatedAuthClient {
159
159
  async archiveServiceAccountComplete(request, signedChallenge) {
160
160
  const path = (0, url_1.buildPathAndQuery)('/auth/service-accounts/:serviceAccountId', {
161
161
  path: request ?? {},
162
- query: {},
162
+ query: request.query ?? {},
163
163
  });
164
164
  const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
165
165
  const response = await (0, fetch_1.simpleFetch)(path, {
@@ -564,7 +564,7 @@ class DelegatedAuthClient {
564
564
  const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
565
565
  userActionHttpMethod: 'PUT',
566
566
  userActionHttpPath: path,
567
- userActionPayload: JSON.stringify({}),
567
+ userActionPayload: JSON.stringify(request.body),
568
568
  userActionServerKind: 'Api',
569
569
  }, this.apiOptions);
570
570
  return challenge;
@@ -577,7 +577,7 @@ class DelegatedAuthClient {
577
577
  const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
578
578
  const response = await (0, fetch_1.simpleFetch)(path, {
579
579
  method: 'PUT',
580
- body: {},
580
+ body: request.body,
581
581
  headers: { 'x-dfns-useraction': userAction },
582
582
  apiOptions: this.apiOptions,
583
583
  });
@@ -129,6 +129,10 @@ export type ArchivePersonalAccessTokenRequest = ArchivePersonalAccessTokenParams
129
129
  export type ArchiveServiceAccountParams = {
130
130
  serviceAccountId: string;
131
131
  };
132
+ export type ArchiveServiceAccountQuery = {
133
+ /** If true, bypasses the policy approver check and deletes immediately. */
134
+ force?: boolean;
135
+ };
132
136
  export type ArchiveServiceAccountResponse = {
133
137
  userInfo: {
134
138
  username: string;
@@ -171,7 +175,9 @@ export type ArchiveServiceAccountResponse = {
171
175
  tokenId: string;
172
176
  }[];
173
177
  };
174
- export type ArchiveServiceAccountRequest = ArchiveServiceAccountParams;
178
+ export type ArchiveServiceAccountRequest = ArchiveServiceAccountParams & {
179
+ query?: ArchiveServiceAccountQuery;
180
+ };
175
181
  export type ArchiveUserParams = {
176
182
  userId: string;
177
183
  };
@@ -1329,6 +1335,10 @@ export type DeactivatePersonalAccessTokenResponse = {
1329
1335
  tokenId: string;
1330
1336
  };
1331
1337
  export type DeactivatePersonalAccessTokenRequest = DeactivatePersonalAccessTokenParams;
1338
+ export type DeactivateServiceAccountBody = {
1339
+ /** If true, bypasses the policy approver check and deactivates immediately. */
1340
+ force?: boolean;
1341
+ };
1332
1342
  export type DeactivateServiceAccountParams = {
1333
1343
  serviceAccountId: string;
1334
1344
  };
@@ -1374,7 +1384,9 @@ export type DeactivateServiceAccountResponse = {
1374
1384
  tokenId: string;
1375
1385
  }[];
1376
1386
  };
1377
- export type DeactivateServiceAccountRequest = DeactivateServiceAccountParams;
1387
+ export type DeactivateServiceAccountRequest = DeactivateServiceAccountParams & {
1388
+ body: DeactivateServiceAccountBody;
1389
+ };
1378
1390
  export type DeactivateUserParams = {
1379
1391
  userId: string;
1380
1392
  };
@@ -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;
@@ -120,7 +120,7 @@ export type GetCantonValidatorResponse = {
120
120
  };
121
121
  export type GetCantonValidatorRequest = GetCantonValidatorParams;
122
122
  export type GetFeesQuery = {
123
- network: "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia" | "Sonic" | "SonicTestnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1";
123
+ network: "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Adi" | "AdiTestnet" | "AdiTestnetAb" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "ArcTestnet" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumClassic" | "EthereumClassicMordor" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "FlowEvm" | "FlowEvmTestnet" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plasma" | "PlasmaTestnet" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia" | "Sonic" | "SonicTestnet" | "Tempo" | "TempoAndantino" | "TempoModerato" | "Tsc" | "TscTestnet1" | "Solana" | "SolanaDevnet";
124
124
  };
125
125
  export type GetFeesResponse = {
126
126
  kind: "Bitcoin";
@@ -155,6 +155,19 @@ export type GetFeesResponse = {
155
155
  maxFeePerGas: string;
156
156
  };
157
157
  baseFeePerGas: string;
158
+ } | {
159
+ kind: "Solana";
160
+ network: "Solana" | "SolanaDevnet";
161
+ blockNumber: number;
162
+ slow: {
163
+ computeUnitPrice: string;
164
+ };
165
+ standard: {
166
+ computeUnitPrice: string;
167
+ };
168
+ fast: {
169
+ computeUnitPrice: string;
170
+ };
158
171
  };
159
172
  export type GetFeesRequest = {
160
173
  query?: GetFeesQuery;
@@ -0,0 +1,11 @@
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
+ listPayouts(request?: T.ListPayoutsRequest): Promise<T.ListPayoutsResponse>;
11
+ }
@@ -0,0 +1,71 @@
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
+ async listPayouts(request) {
60
+ const path = (0, url_1.buildPathAndQuery)('/payouts', {
61
+ path: request ?? {},
62
+ query: request?.query ?? {},
63
+ });
64
+ const response = await (0, fetch_1.simpleFetch)(path, {
65
+ method: 'GET',
66
+ apiOptions: this.apiOptions,
67
+ });
68
+ return response.json();
69
+ }
70
+ }
71
+ exports.PayoutsClient = PayoutsClient;
@@ -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 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
+ listPayouts(request?: T.ListPayoutsRequest): Promise<T.ListPayoutsResponse>;
14
+ }
@@ -0,0 +1,100 @@
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
+ async listPayouts(request) {
89
+ const path = (0, url_1.buildPathAndQuery)('/payouts', {
90
+ path: request ?? {},
91
+ query: request?.query ?? {},
92
+ });
93
+ const response = await (0, fetch_1.simpleFetch)(path, {
94
+ method: 'GET',
95
+ apiOptions: this.apiOptions,
96
+ });
97
+ return response.json();
98
+ }
99
+ }
100
+ 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);