@dfns/sdk 0.6.5 → 0.6.6-rc.2
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/dfnsApiClient.d.ts +2 -0
- package/dfnsApiClient.js +4 -0
- package/dfnsDelegatedApiClient.d.ts +2 -0
- package/dfnsDelegatedApiClient.js +4 -0
- package/generated/auth/types.d.ts +2 -5
- package/generated/exchanges/types.d.ts +1 -1
- package/generated/feeSponsors/types.d.ts +6 -6
- package/generated/keys/client.d.ts +16 -0
- package/generated/keys/client.js +129 -0
- package/generated/keys/delegatedClient.d.ts +23 -0
- package/generated/keys/delegatedClient.js +218 -0
- package/generated/keys/index.d.ts +3 -0
- package/generated/keys/index.js +19 -0
- package/generated/keys/types.d.ts +540 -0
- package/generated/keys/types.js +2 -0
- package/generated/policies/types.d.ts +75 -75
- package/generated/staking/types.d.ts +121 -33
- package/generated/wallets/types.d.ts +66 -80
- package/package.json +1 -1
- package/types/keys.d.ts +1 -0
- package/types/keys.js +17 -0
package/dfnsApiClient.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DfnsBaseApiOptions } from './baseAuthApi';
|
|
2
2
|
import { AuthClient } from './generated/auth';
|
|
3
3
|
import { ExchangesClient } from './generated/exchanges';
|
|
4
|
+
import { KeysClient } from './generated/keys';
|
|
4
5
|
import { NetworksClient } from './generated/networks';
|
|
5
6
|
import { PermissionsClient } from './generated/permissions';
|
|
6
7
|
import { PoliciesClient } from './generated/policies';
|
|
@@ -18,6 +19,7 @@ export declare class DfnsApiClient {
|
|
|
18
19
|
constructor(apiOptions: DfnsApiClientOptions);
|
|
19
20
|
get auth(): AuthClient;
|
|
20
21
|
get exchanges(): ExchangesClient;
|
|
22
|
+
get keys(): KeysClient;
|
|
21
23
|
get networks(): NetworksClient;
|
|
22
24
|
get permissions(): PermissionsClient;
|
|
23
25
|
get policies(): PoliciesClient;
|
package/dfnsApiClient.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DfnsApiClient = void 0;
|
|
4
4
|
const auth_1 = require("./generated/auth");
|
|
5
5
|
const exchanges_1 = require("./generated/exchanges");
|
|
6
|
+
const keys_1 = require("./generated/keys");
|
|
6
7
|
const networks_1 = require("./generated/networks");
|
|
7
8
|
const permissions_1 = require("./generated/permissions");
|
|
8
9
|
const policies_1 = require("./generated/policies");
|
|
@@ -20,6 +21,9 @@ class DfnsApiClient {
|
|
|
20
21
|
get exchanges() {
|
|
21
22
|
return new exchanges_1.ExchangesClient(this.apiOptions);
|
|
22
23
|
}
|
|
24
|
+
get keys() {
|
|
25
|
+
return new keys_1.KeysClient(this.apiOptions);
|
|
26
|
+
}
|
|
23
27
|
get networks() {
|
|
24
28
|
return new networks_1.NetworksClient(this.apiOptions);
|
|
25
29
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DfnsBaseApiOptions } from './baseAuthApi';
|
|
2
2
|
import { DelegatedAuthClient } from './generated/auth';
|
|
3
3
|
import { DelegatedExchangesClient } from './generated/exchanges';
|
|
4
|
+
import { DelegatedKeysClient } from './generated/keys';
|
|
4
5
|
import { DelegatedNetworksClient } from './generated/networks';
|
|
5
6
|
import { DelegatedPermissionsClient } from './generated/permissions';
|
|
6
7
|
import { DelegatedPoliciesClient } from './generated/policies';
|
|
@@ -13,6 +14,7 @@ export declare class DfnsDelegatedApiClient {
|
|
|
13
14
|
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
14
15
|
get auth(): DelegatedAuthClient;
|
|
15
16
|
get exchanges(): DelegatedExchangesClient;
|
|
17
|
+
get keys(): DelegatedKeysClient;
|
|
16
18
|
get networks(): DelegatedNetworksClient;
|
|
17
19
|
get permissions(): DelegatedPermissionsClient;
|
|
18
20
|
get policies(): DelegatedPoliciesClient;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DfnsDelegatedApiClient = void 0;
|
|
4
4
|
const auth_1 = require("./generated/auth");
|
|
5
5
|
const exchanges_1 = require("./generated/exchanges");
|
|
6
|
+
const keys_1 = require("./generated/keys");
|
|
6
7
|
const networks_1 = require("./generated/networks");
|
|
7
8
|
const permissions_1 = require("./generated/permissions");
|
|
8
9
|
const policies_1 = require("./generated/policies");
|
|
@@ -19,6 +20,9 @@ class DfnsDelegatedApiClient {
|
|
|
19
20
|
get exchanges() {
|
|
20
21
|
return new exchanges_1.DelegatedExchangesClient(this.apiOptions);
|
|
21
22
|
}
|
|
23
|
+
get keys() {
|
|
24
|
+
return new keys_1.DelegatedKeysClient(this.apiOptions);
|
|
25
|
+
}
|
|
22
26
|
get networks() {
|
|
23
27
|
return new networks_1.DelegatedNetworksClient(this.apiOptions);
|
|
24
28
|
}
|
|
@@ -1975,7 +1975,7 @@ export type RegisterEndUserBody = {
|
|
|
1975
1975
|
credentialName?: string | undefined;
|
|
1976
1976
|
} | undefined;
|
|
1977
1977
|
wallets: {
|
|
1978
|
-
network: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet") | ("KeyECDSA" | "KeyEdDSA" | "KeyECDSAStark");
|
|
1978
|
+
network: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet") | ("KeyECDSA" | "KeyEdDSA" | "KeyECDSAStark");
|
|
1979
1979
|
name?: string | undefined;
|
|
1980
1980
|
}[];
|
|
1981
1981
|
};
|
|
@@ -1995,7 +1995,7 @@ export type RegisterEndUserResponse = {
|
|
|
1995
1995
|
};
|
|
1996
1996
|
wallets: {
|
|
1997
1997
|
id: string;
|
|
1998
|
-
network: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet") | ("KeyECDSA" | "KeyEdDSA" | "KeyECDSAStark");
|
|
1998
|
+
network: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet") | ("KeyECDSA" | "KeyEdDSA" | "KeyECDSAStark");
|
|
1999
1999
|
address?: string | undefined;
|
|
2000
2000
|
signingKey: {
|
|
2001
2001
|
id: string;
|
|
@@ -2008,9 +2008,6 @@ export type RegisterEndUserResponse = {
|
|
|
2008
2008
|
dateCreated: string;
|
|
2009
2009
|
name?: string | undefined;
|
|
2010
2010
|
custodial: boolean;
|
|
2011
|
-
imported?: boolean | undefined;
|
|
2012
|
-
exported?: boolean | undefined;
|
|
2013
|
-
dateExported?: string | undefined;
|
|
2014
2011
|
externalId?: string | undefined;
|
|
2015
2012
|
tags: string[];
|
|
2016
2013
|
}[];
|
|
@@ -398,7 +398,7 @@ export type ListAssetWithdrawalNetworksResponse = (({
|
|
|
398
398
|
kind: "Tep74";
|
|
399
399
|
master: string;
|
|
400
400
|
}) & {
|
|
401
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
401
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
402
402
|
decimals: number;
|
|
403
403
|
})[];
|
|
404
404
|
export type ListAssetWithdrawalNetworksRequest = ListAssetWithdrawalNetworksParams;
|
|
@@ -4,7 +4,7 @@ export type ActivateFeeSponsorParams = {
|
|
|
4
4
|
export type ActivateFeeSponsorResponse = {
|
|
5
5
|
id: string;
|
|
6
6
|
walletId: string;
|
|
7
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
7
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
8
8
|
status: "Active" | "Deactivated" | "Archived";
|
|
9
9
|
dateCreated: string;
|
|
10
10
|
dateUpdated: string;
|
|
@@ -16,7 +16,7 @@ export type CreateFeeSponsorBody = {
|
|
|
16
16
|
export type CreateFeeSponsorResponse = {
|
|
17
17
|
id: string;
|
|
18
18
|
walletId: string;
|
|
19
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
19
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
20
20
|
status: "Active" | "Deactivated" | "Archived";
|
|
21
21
|
dateCreated: string;
|
|
22
22
|
dateUpdated: string;
|
|
@@ -30,7 +30,7 @@ export type DeactivateFeeSponsorParams = {
|
|
|
30
30
|
export type DeactivateFeeSponsorResponse = {
|
|
31
31
|
id: string;
|
|
32
32
|
walletId: string;
|
|
33
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
33
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
34
34
|
status: "Active" | "Deactivated" | "Archived";
|
|
35
35
|
dateCreated: string;
|
|
36
36
|
dateUpdated: string;
|
|
@@ -42,7 +42,7 @@ export type DeleteFeeSponsorParams = {
|
|
|
42
42
|
export type DeleteFeeSponsorResponse = {
|
|
43
43
|
id: string;
|
|
44
44
|
walletId: string;
|
|
45
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
45
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
46
46
|
status: "Active" | "Deactivated" | "Archived";
|
|
47
47
|
dateCreated: string;
|
|
48
48
|
dateUpdated: string;
|
|
@@ -54,7 +54,7 @@ export type GetFeeSponsorParams = {
|
|
|
54
54
|
export type GetFeeSponsorResponse = {
|
|
55
55
|
id: string;
|
|
56
56
|
walletId: string;
|
|
57
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
57
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
58
58
|
status: "Active" | "Deactivated" | "Archived";
|
|
59
59
|
dateCreated: string;
|
|
60
60
|
dateUpdated: string;
|
|
@@ -68,7 +68,7 @@ export type ListFeeSponsorsResponse = {
|
|
|
68
68
|
items: {
|
|
69
69
|
id: string;
|
|
70
70
|
walletId: string;
|
|
71
|
-
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
71
|
+
network: "Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet";
|
|
72
72
|
status: "Active" | "Deactivated" | "Archived";
|
|
73
73
|
dateCreated: string;
|
|
74
74
|
dateUpdated: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DfnsApiClientOptions } from '../../types/generic';
|
|
2
|
+
import * as T from './types';
|
|
3
|
+
export declare class KeysClient {
|
|
4
|
+
private apiOptions;
|
|
5
|
+
constructor(apiOptions: DfnsApiClientOptions);
|
|
6
|
+
createKey(request: T.CreateKeyRequest): Promise<T.CreateKeyResponse>;
|
|
7
|
+
delegateKey(request: T.DelegateKeyRequest): Promise<T.DelegateKeyResponse>;
|
|
8
|
+
exportKey(request: T.ExportKeyRequest): Promise<T.ExportKeyResponse>;
|
|
9
|
+
generateSignature(request: T.GenerateSignatureRequest): Promise<T.GenerateSignatureResponse>;
|
|
10
|
+
getKey(request: T.GetKeyRequest): Promise<T.GetKeyResponse>;
|
|
11
|
+
getSignature(request: T.GetSignatureRequest): Promise<T.GetSignatureResponse>;
|
|
12
|
+
importKey(request: T.ImportKeyRequest): Promise<T.ImportKeyResponse>;
|
|
13
|
+
listKeys(request?: T.ListKeysRequest): Promise<T.ListKeysResponse>;
|
|
14
|
+
listSignatures(request: T.ListSignaturesRequest): Promise<T.ListSignaturesResponse>;
|
|
15
|
+
updateKey(request: T.UpdateKeyRequest): Promise<T.UpdateKeyResponse>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint @typescript-eslint/no-unused-vars: 0 */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.KeysClient = 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 KeysClient {
|
|
9
|
+
constructor(apiOptions) {
|
|
10
|
+
this.apiOptions = apiOptions;
|
|
11
|
+
}
|
|
12
|
+
async createKey(request) {
|
|
13
|
+
const path = (0, url_1.buildPathAndQuery)('/keys', {
|
|
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 delegateKey(request) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/delegate', {
|
|
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 exportKey(request) {
|
|
37
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/export', {
|
|
38
|
+
path: request ?? {},
|
|
39
|
+
query: {},
|
|
40
|
+
});
|
|
41
|
+
const response = await (0, userActionFetch_1.userActionFetch)(path, {
|
|
42
|
+
method: 'POST',
|
|
43
|
+
body: request.body,
|
|
44
|
+
apiOptions: this.apiOptions,
|
|
45
|
+
});
|
|
46
|
+
return response.json();
|
|
47
|
+
}
|
|
48
|
+
async generateSignature(request) {
|
|
49
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/signatures', {
|
|
50
|
+
path: request ?? {},
|
|
51
|
+
query: {},
|
|
52
|
+
});
|
|
53
|
+
const response = await (0, userActionFetch_1.userActionFetch)(path, {
|
|
54
|
+
method: 'POST',
|
|
55
|
+
body: request.body,
|
|
56
|
+
apiOptions: this.apiOptions,
|
|
57
|
+
});
|
|
58
|
+
return response.json();
|
|
59
|
+
}
|
|
60
|
+
async getKey(request) {
|
|
61
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId', {
|
|
62
|
+
path: request ?? {},
|
|
63
|
+
query: {},
|
|
64
|
+
});
|
|
65
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
66
|
+
method: 'GET',
|
|
67
|
+
apiOptions: this.apiOptions,
|
|
68
|
+
});
|
|
69
|
+
return response.json();
|
|
70
|
+
}
|
|
71
|
+
async getSignature(request) {
|
|
72
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/signatures/:signatureId', {
|
|
73
|
+
path: request ?? {},
|
|
74
|
+
query: {},
|
|
75
|
+
});
|
|
76
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
77
|
+
method: 'GET',
|
|
78
|
+
apiOptions: this.apiOptions,
|
|
79
|
+
});
|
|
80
|
+
return response.json();
|
|
81
|
+
}
|
|
82
|
+
async importKey(request) {
|
|
83
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/import', {
|
|
84
|
+
path: request ?? {},
|
|
85
|
+
query: {},
|
|
86
|
+
});
|
|
87
|
+
const response = await (0, userActionFetch_1.userActionFetch)(path, {
|
|
88
|
+
method: 'POST',
|
|
89
|
+
body: request.body,
|
|
90
|
+
apiOptions: this.apiOptions,
|
|
91
|
+
});
|
|
92
|
+
return response.json();
|
|
93
|
+
}
|
|
94
|
+
async listKeys(request) {
|
|
95
|
+
const path = (0, url_1.buildPathAndQuery)('/keys', {
|
|
96
|
+
path: request ?? {},
|
|
97
|
+
query: request?.query ?? {},
|
|
98
|
+
});
|
|
99
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
100
|
+
method: 'GET',
|
|
101
|
+
apiOptions: this.apiOptions,
|
|
102
|
+
});
|
|
103
|
+
return response.json();
|
|
104
|
+
}
|
|
105
|
+
async listSignatures(request) {
|
|
106
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:keyId/signatures', {
|
|
107
|
+
path: request ?? {},
|
|
108
|
+
query: request.query ?? {},
|
|
109
|
+
});
|
|
110
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
111
|
+
method: 'GET',
|
|
112
|
+
apiOptions: this.apiOptions,
|
|
113
|
+
});
|
|
114
|
+
return response.json();
|
|
115
|
+
}
|
|
116
|
+
async updateKey(request) {
|
|
117
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId', {
|
|
118
|
+
path: request ?? {},
|
|
119
|
+
query: {},
|
|
120
|
+
});
|
|
121
|
+
const response = await (0, userActionFetch_1.userActionFetch)(path, {
|
|
122
|
+
method: 'PUT',
|
|
123
|
+
body: request.body,
|
|
124
|
+
apiOptions: this.apiOptions,
|
|
125
|
+
});
|
|
126
|
+
return response.json();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.KeysClient = KeysClient;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi';
|
|
2
|
+
import { DfnsDelegatedApiClientOptions } from '../../dfnsDelegatedApiClient';
|
|
3
|
+
import * as T from './types';
|
|
4
|
+
export declare class DelegatedKeysClient {
|
|
5
|
+
private apiOptions;
|
|
6
|
+
constructor(apiOptions: DfnsDelegatedApiClientOptions);
|
|
7
|
+
createKeyInit(request: T.CreateKeyRequest): Promise<UserActionChallengeResponse>;
|
|
8
|
+
createKeyComplete(request: T.CreateKeyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateKeyResponse>;
|
|
9
|
+
delegateKeyInit(request: T.DelegateKeyRequest): Promise<UserActionChallengeResponse>;
|
|
10
|
+
delegateKeyComplete(request: T.DelegateKeyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.DelegateKeyResponse>;
|
|
11
|
+
exportKeyInit(request: T.ExportKeyRequest): Promise<UserActionChallengeResponse>;
|
|
12
|
+
exportKeyComplete(request: T.ExportKeyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ExportKeyResponse>;
|
|
13
|
+
generateSignatureInit(request: T.GenerateSignatureRequest): Promise<UserActionChallengeResponse>;
|
|
14
|
+
generateSignatureComplete(request: T.GenerateSignatureRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.GenerateSignatureResponse>;
|
|
15
|
+
getKey(request: T.GetKeyRequest): Promise<T.GetKeyResponse>;
|
|
16
|
+
getSignature(request: T.GetSignatureRequest): Promise<T.GetSignatureResponse>;
|
|
17
|
+
importKeyInit(request: T.ImportKeyRequest): Promise<UserActionChallengeResponse>;
|
|
18
|
+
importKeyComplete(request: T.ImportKeyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.ImportKeyResponse>;
|
|
19
|
+
listKeys(request?: T.ListKeysRequest): Promise<T.ListKeysResponse>;
|
|
20
|
+
listSignatures(request: T.ListSignaturesRequest): Promise<T.ListSignaturesResponse>;
|
|
21
|
+
updateKeyInit(request: T.UpdateKeyRequest): Promise<UserActionChallengeResponse>;
|
|
22
|
+
updateKeyComplete(request: T.UpdateKeyRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdateKeyResponse>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DelegatedKeysClient = void 0;
|
|
4
|
+
const baseAuthApi_1 = require("../../baseAuthApi");
|
|
5
|
+
const fetch_1 = require("../../utils/fetch");
|
|
6
|
+
const url_1 = require("../../utils/url");
|
|
7
|
+
class DelegatedKeysClient {
|
|
8
|
+
constructor(apiOptions) {
|
|
9
|
+
this.apiOptions = apiOptions;
|
|
10
|
+
}
|
|
11
|
+
async createKeyInit(request) {
|
|
12
|
+
const path = (0, url_1.buildPathAndQuery)('/keys', {
|
|
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 createKeyComplete(request, signedChallenge) {
|
|
25
|
+
const path = (0, url_1.buildPathAndQuery)('/keys', {
|
|
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 delegateKeyInit(request) {
|
|
39
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/delegate', {
|
|
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 delegateKeyComplete(request, signedChallenge) {
|
|
52
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/delegate', {
|
|
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 exportKeyInit(request) {
|
|
66
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/export', {
|
|
67
|
+
path: request ?? {},
|
|
68
|
+
query: {},
|
|
69
|
+
});
|
|
70
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
71
|
+
userActionHttpMethod: 'POST',
|
|
72
|
+
userActionHttpPath: path,
|
|
73
|
+
userActionPayload: JSON.stringify(request.body),
|
|
74
|
+
userActionServerKind: 'Api',
|
|
75
|
+
}, this.apiOptions);
|
|
76
|
+
return challenge;
|
|
77
|
+
}
|
|
78
|
+
async exportKeyComplete(request, signedChallenge) {
|
|
79
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/export', {
|
|
80
|
+
path: request ?? {},
|
|
81
|
+
query: {},
|
|
82
|
+
});
|
|
83
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
84
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
body: request.body,
|
|
87
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
88
|
+
apiOptions: this.apiOptions,
|
|
89
|
+
});
|
|
90
|
+
return response.json();
|
|
91
|
+
}
|
|
92
|
+
async generateSignatureInit(request) {
|
|
93
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/signatures', {
|
|
94
|
+
path: request ?? {},
|
|
95
|
+
query: {},
|
|
96
|
+
});
|
|
97
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
98
|
+
userActionHttpMethod: 'POST',
|
|
99
|
+
userActionHttpPath: path,
|
|
100
|
+
userActionPayload: JSON.stringify(request.body),
|
|
101
|
+
userActionServerKind: 'Api',
|
|
102
|
+
}, this.apiOptions);
|
|
103
|
+
return challenge;
|
|
104
|
+
}
|
|
105
|
+
async generateSignatureComplete(request, signedChallenge) {
|
|
106
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/signatures', {
|
|
107
|
+
path: request ?? {},
|
|
108
|
+
query: {},
|
|
109
|
+
});
|
|
110
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
111
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
112
|
+
method: 'POST',
|
|
113
|
+
body: request.body,
|
|
114
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
115
|
+
apiOptions: this.apiOptions,
|
|
116
|
+
});
|
|
117
|
+
return response.json();
|
|
118
|
+
}
|
|
119
|
+
async getKey(request) {
|
|
120
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId', {
|
|
121
|
+
path: request ?? {},
|
|
122
|
+
query: {},
|
|
123
|
+
});
|
|
124
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
125
|
+
method: 'GET',
|
|
126
|
+
apiOptions: this.apiOptions,
|
|
127
|
+
});
|
|
128
|
+
return response.json();
|
|
129
|
+
}
|
|
130
|
+
async getSignature(request) {
|
|
131
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId/signatures/:signatureId', {
|
|
132
|
+
path: request ?? {},
|
|
133
|
+
query: {},
|
|
134
|
+
});
|
|
135
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
136
|
+
method: 'GET',
|
|
137
|
+
apiOptions: this.apiOptions,
|
|
138
|
+
});
|
|
139
|
+
return response.json();
|
|
140
|
+
}
|
|
141
|
+
async importKeyInit(request) {
|
|
142
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/import', {
|
|
143
|
+
path: request ?? {},
|
|
144
|
+
query: {},
|
|
145
|
+
});
|
|
146
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
147
|
+
userActionHttpMethod: 'POST',
|
|
148
|
+
userActionHttpPath: path,
|
|
149
|
+
userActionPayload: JSON.stringify(request.body),
|
|
150
|
+
userActionServerKind: 'Api',
|
|
151
|
+
}, this.apiOptions);
|
|
152
|
+
return challenge;
|
|
153
|
+
}
|
|
154
|
+
async importKeyComplete(request, signedChallenge) {
|
|
155
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/import', {
|
|
156
|
+
path: request ?? {},
|
|
157
|
+
query: {},
|
|
158
|
+
});
|
|
159
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
160
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
161
|
+
method: 'POST',
|
|
162
|
+
body: request.body,
|
|
163
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
164
|
+
apiOptions: this.apiOptions,
|
|
165
|
+
});
|
|
166
|
+
return response.json();
|
|
167
|
+
}
|
|
168
|
+
async listKeys(request) {
|
|
169
|
+
const path = (0, url_1.buildPathAndQuery)('/keys', {
|
|
170
|
+
path: request ?? {},
|
|
171
|
+
query: request?.query ?? {},
|
|
172
|
+
});
|
|
173
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
174
|
+
method: 'GET',
|
|
175
|
+
apiOptions: this.apiOptions,
|
|
176
|
+
});
|
|
177
|
+
return response.json();
|
|
178
|
+
}
|
|
179
|
+
async listSignatures(request) {
|
|
180
|
+
const path = (0, url_1.buildPathAndQuery)('/wallets/:keyId/signatures', {
|
|
181
|
+
path: request ?? {},
|
|
182
|
+
query: request.query ?? {},
|
|
183
|
+
});
|
|
184
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
185
|
+
method: 'GET',
|
|
186
|
+
apiOptions: this.apiOptions,
|
|
187
|
+
});
|
|
188
|
+
return response.json();
|
|
189
|
+
}
|
|
190
|
+
async updateKeyInit(request) {
|
|
191
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId', {
|
|
192
|
+
path: request ?? {},
|
|
193
|
+
query: {},
|
|
194
|
+
});
|
|
195
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
196
|
+
userActionHttpMethod: 'PUT',
|
|
197
|
+
userActionHttpPath: path,
|
|
198
|
+
userActionPayload: JSON.stringify(request.body),
|
|
199
|
+
userActionServerKind: 'Api',
|
|
200
|
+
}, this.apiOptions);
|
|
201
|
+
return challenge;
|
|
202
|
+
}
|
|
203
|
+
async updateKeyComplete(request, signedChallenge) {
|
|
204
|
+
const path = (0, url_1.buildPathAndQuery)('/keys/:keyId', {
|
|
205
|
+
path: request ?? {},
|
|
206
|
+
query: {},
|
|
207
|
+
});
|
|
208
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
209
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
210
|
+
method: 'PUT',
|
|
211
|
+
body: request.body,
|
|
212
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
213
|
+
apiOptions: this.apiOptions,
|
|
214
|
+
});
|
|
215
|
+
return response.json();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
exports.DelegatedKeysClient = DelegatedKeysClient;
|
|
@@ -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);
|