@circle-fin/user-controlled-wallets 10.4.0 → 10.5.1
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.
|
@@ -563,7 +563,7 @@ declare class HostUnreachableError extends HttpRequestError {
|
|
|
563
563
|
* @param error - The AxiosError to transform.
|
|
564
564
|
* @returns Specific HttpError instance based on error type and status.
|
|
565
565
|
*/
|
|
566
|
-
declare function fromAxiosError(error: AxiosError):
|
|
566
|
+
declare function fromAxiosError(error: AxiosError): HttpRequestError | HttpResponseError;
|
|
567
567
|
|
|
568
568
|
/**
|
|
569
569
|
* Circle API Error Classes
|
|
@@ -810,12 +810,24 @@ interface CreateContractExecutionTransactionForEndUserRequest {
|
|
|
810
810
|
* @memberof CreateContractExecutionTransactionForEndUserRequest
|
|
811
811
|
*/
|
|
812
812
|
'refId'?: string;
|
|
813
|
+
/**
|
|
814
|
+
*
|
|
815
|
+
* @type {ContractExecutionBlockchain}
|
|
816
|
+
* @memberof CreateContractExecutionTransactionForEndUserRequest
|
|
817
|
+
*/
|
|
818
|
+
'blockchain'?: ContractExecutionBlockchain;
|
|
813
819
|
/**
|
|
814
820
|
* Unique system generated identifier of the wallet. For contract deploys this wallet ID will be used as the source.
|
|
815
821
|
* @type {string}
|
|
816
822
|
* @memberof CreateContractExecutionTransactionForEndUserRequest
|
|
817
823
|
*/
|
|
818
|
-
'walletId'
|
|
824
|
+
'walletId'?: string;
|
|
825
|
+
/**
|
|
826
|
+
* Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects.
|
|
827
|
+
* @type {string}
|
|
828
|
+
* @memberof CreateContractExecutionTransactionForEndUserRequest
|
|
829
|
+
*/
|
|
830
|
+
'walletAddress'?: string;
|
|
819
831
|
}
|
|
820
832
|
|
|
821
833
|
/**
|
|
@@ -1051,7 +1063,13 @@ interface CreateTransferTransactionForEndUserRequest {
|
|
|
1051
1063
|
* @type {string}
|
|
1052
1064
|
* @memberof CreateTransferTransactionForEndUserRequest
|
|
1053
1065
|
*/
|
|
1054
|
-
'walletId'
|
|
1066
|
+
'walletId'?: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects.
|
|
1069
|
+
* @type {string}
|
|
1070
|
+
* @memberof CreateTransferTransactionForEndUserRequest
|
|
1071
|
+
*/
|
|
1072
|
+
'walletAddress'?: string;
|
|
1055
1073
|
}
|
|
1056
1074
|
|
|
1057
1075
|
/**
|
|
@@ -1168,12 +1186,24 @@ interface CreateWalletUpgradeTransactionForEndUserRequest {
|
|
|
1168
1186
|
* @memberof CreateWalletUpgradeTransactionForEndUserRequest
|
|
1169
1187
|
*/
|
|
1170
1188
|
'refId'?: string;
|
|
1189
|
+
/**
|
|
1190
|
+
*
|
|
1191
|
+
* @type {Blockchain}
|
|
1192
|
+
* @memberof CreateWalletUpgradeTransactionForEndUserRequest
|
|
1193
|
+
*/
|
|
1194
|
+
'blockchain'?: Blockchain;
|
|
1171
1195
|
/**
|
|
1172
1196
|
* Unique system generated identifier of the wallet. For contract deploys this wallet ID will be used as the source.
|
|
1173
1197
|
* @type {string}
|
|
1174
1198
|
* @memberof CreateWalletUpgradeTransactionForEndUserRequest
|
|
1175
1199
|
*/
|
|
1176
|
-
'walletId'
|
|
1200
|
+
'walletId'?: string;
|
|
1201
|
+
/**
|
|
1202
|
+
* Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects.
|
|
1203
|
+
* @type {string}
|
|
1204
|
+
* @memberof CreateWalletUpgradeTransactionForEndUserRequest
|
|
1205
|
+
*/
|
|
1206
|
+
'walletAddress'?: string;
|
|
1177
1207
|
}
|
|
1178
1208
|
|
|
1179
1209
|
/**
|
|
@@ -1932,16 +1962,16 @@ type TransactionScreeningDecision = BaseScreeningDecision;
|
|
|
1932
1962
|
* @enum {string}
|
|
1933
1963
|
*/
|
|
1934
1964
|
declare const TransactionState: {
|
|
1935
|
-
readonly Cancelled: "CANCELLED";
|
|
1936
|
-
readonly Confirmed: "CONFIRMED";
|
|
1937
|
-
readonly Complete: "COMPLETE";
|
|
1938
|
-
readonly Denied: "DENIED";
|
|
1939
|
-
readonly Failed: "FAILED";
|
|
1940
1965
|
readonly Initiated: "INITIATED";
|
|
1941
1966
|
readonly Cleared: "CLEARED";
|
|
1942
1967
|
readonly Queued: "QUEUED";
|
|
1943
1968
|
readonly Sent: "SENT";
|
|
1944
1969
|
readonly Stuck: "STUCK";
|
|
1970
|
+
readonly Confirmed: "CONFIRMED";
|
|
1971
|
+
readonly Complete: "COMPLETE";
|
|
1972
|
+
readonly Failed: "FAILED";
|
|
1973
|
+
readonly Denied: "DENIED";
|
|
1974
|
+
readonly Cancelled: "CANCELLED";
|
|
1945
1975
|
};
|
|
1946
1976
|
type TransactionState = typeof TransactionState[keyof typeof TransactionState];
|
|
1947
1977
|
|
|
@@ -2797,6 +2827,7 @@ interface SetPinRequest {
|
|
|
2797
2827
|
* https://openapi-generator.tech
|
|
2798
2828
|
* Do not edit the class manually.
|
|
2799
2829
|
*/
|
|
2830
|
+
|
|
2800
2831
|
/**
|
|
2801
2832
|
*
|
|
2802
2833
|
* @export
|
|
@@ -2808,7 +2839,19 @@ interface SignMessageRequest {
|
|
|
2808
2839
|
* @type {string}
|
|
2809
2840
|
* @memberof SignMessageRequest
|
|
2810
2841
|
*/
|
|
2811
|
-
'walletId'
|
|
2842
|
+
'walletId'?: string;
|
|
2843
|
+
/**
|
|
2844
|
+
*
|
|
2845
|
+
* @type {Blockchain}
|
|
2846
|
+
* @memberof SignMessageRequest
|
|
2847
|
+
*/
|
|
2848
|
+
'blockchain'?: Blockchain;
|
|
2849
|
+
/**
|
|
2850
|
+
* Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects.
|
|
2851
|
+
* @type {string}
|
|
2852
|
+
* @memberof SignMessageRequest
|
|
2853
|
+
*/
|
|
2854
|
+
'walletAddress'?: string;
|
|
2812
2855
|
/**
|
|
2813
2856
|
* Indicator of whether the input message is encoded by hex. If TRUE, then the message should be a hex string. By default, it is False.
|
|
2814
2857
|
* @type {boolean}
|
|
@@ -2854,6 +2897,7 @@ interface SignTransactionResponse {
|
|
|
2854
2897
|
* https://openapi-generator.tech
|
|
2855
2898
|
* Do not edit the class manually.
|
|
2856
2899
|
*/
|
|
2900
|
+
|
|
2857
2901
|
/**
|
|
2858
2902
|
*
|
|
2859
2903
|
* @export
|
|
@@ -2865,7 +2909,19 @@ interface SignTypedDataRequest {
|
|
|
2865
2909
|
* @type {string}
|
|
2866
2910
|
* @memberof SignTypedDataRequest
|
|
2867
2911
|
*/
|
|
2868
|
-
'walletId'
|
|
2912
|
+
'walletId'?: string;
|
|
2913
|
+
/**
|
|
2914
|
+
*
|
|
2915
|
+
* @type {Blockchain}
|
|
2916
|
+
* @memberof SignTypedDataRequest
|
|
2917
|
+
*/
|
|
2918
|
+
'blockchain'?: Blockchain;
|
|
2919
|
+
/**
|
|
2920
|
+
* Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects.
|
|
2921
|
+
* @type {string}
|
|
2922
|
+
* @memberof SignTypedDataRequest
|
|
2923
|
+
*/
|
|
2924
|
+
'walletAddress'?: string;
|
|
2869
2925
|
/**
|
|
2870
2926
|
* A string represents the typed structured data in EIP-712
|
|
2871
2927
|
* @type {string}
|
|
@@ -2885,6 +2941,7 @@ interface SignTypedDataRequest {
|
|
|
2885
2941
|
* https://openapi-generator.tech
|
|
2886
2942
|
* Do not edit the class manually.
|
|
2887
2943
|
*/
|
|
2944
|
+
|
|
2888
2945
|
/**
|
|
2889
2946
|
*
|
|
2890
2947
|
* @export
|
|
@@ -2896,7 +2953,19 @@ interface SignUserTransactionRequest {
|
|
|
2896
2953
|
* @type {string}
|
|
2897
2954
|
* @memberof SignUserTransactionRequest
|
|
2898
2955
|
*/
|
|
2899
|
-
'walletId'
|
|
2956
|
+
'walletId'?: string;
|
|
2957
|
+
/**
|
|
2958
|
+
*
|
|
2959
|
+
* @type {Blockchain}
|
|
2960
|
+
* @memberof SignUserTransactionRequest
|
|
2961
|
+
*/
|
|
2962
|
+
'blockchain'?: Blockchain;
|
|
2963
|
+
/**
|
|
2964
|
+
* Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects.
|
|
2965
|
+
* @type {string}
|
|
2966
|
+
* @memberof SignUserTransactionRequest
|
|
2967
|
+
*/
|
|
2968
|
+
'walletAddress'?: string;
|
|
2900
2969
|
/**
|
|
2901
2970
|
* Raw transaction string that needs to be signed. Excluded with `transaction`. Required without `transaction`. Required to be base64 encoded for NEAR, Solana chains. Required to be hex encoded for EVM chains.
|
|
2902
2971
|
* @type {string}
|
|
@@ -3585,7 +3654,7 @@ declare class PINAuthenticationApi extends BaseAPI {
|
|
|
3585
3654
|
*/
|
|
3586
3655
|
declare const SigningApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
3587
3656
|
/**
|
|
3588
|
-
* Generates a challenge for signing a message from a specified user-controlled wallet. This endpoint supports Ethereum-based blockchains (using EIP-191), Solana and Aptos (using Ed25519 signatures). Note that Smart Contract Accounts (SCA) are specific to Ethereum and EVM-compatible chains. The difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/.
|
|
3657
|
+
* Generates a challenge for signing a message from a specified user-controlled wallet. This endpoint supports Ethereum-based blockchains (using EIP-191), Solana and Aptos (using Ed25519 signatures). Note that Smart Contract Accounts (SCA) are specific to Ethereum and EVM-compatible chains. The difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
3589
3658
|
* @summary Create a challenge to sign message
|
|
3590
3659
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3591
3660
|
* @param {SignMessageRequest} signMessageRequest Sign message for end user request
|
|
@@ -3595,7 +3664,7 @@ declare const SigningApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
|
3595
3664
|
*/
|
|
3596
3665
|
signUserMessage: (xUserToken: string, signMessageRequest: SignMessageRequest, xRequestId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
3597
3666
|
/**
|
|
3598
|
-
* Generate a challenge for signing the transaction from a specific user-controlled wallet.
|
|
3667
|
+
* Generate a challenge for signing the transaction from a specific user-controlled wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body. NOTE: This endpoint supports the following blockchains: SOL, SOL-DEVNET, EVM, EVM-TESTNET. Each chain defines its own standard. For more details, see [Signing APIs](https://developers.circle.com/w3s/signing-apis).
|
|
3599
3668
|
* @summary Create a challenge to sign transaction
|
|
3600
3669
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3601
3670
|
* @param {SignUserTransactionRequest} signUserTransactionRequest Schema for the request payload to sign a transaction.
|
|
@@ -3605,7 +3674,7 @@ declare const SigningApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
|
3605
3674
|
*/
|
|
3606
3675
|
signUserTransaction: (xUserToken: string, signUserTransactionRequest: SignUserTransactionRequest, xRequestId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
3607
3676
|
/**
|
|
3608
|
-
* Generates a challenge for signing the EIP-712 typed structured data from a specified user-controlled wallet. This endpoint only supports Ethereum and EVM-compatible blockchains. Please note that not all Dapps currently support Smart Contract Accounts (SCA); the difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/.
|
|
3677
|
+
* Generates a challenge for signing the EIP-712 typed structured data from a specified user-controlled wallet. This endpoint only supports Ethereum and EVM-compatible blockchains. Please note that not all Dapps currently support Smart Contract Accounts (SCA); the difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
3609
3678
|
* @summary Create a challenge to sign typed data
|
|
3610
3679
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3611
3680
|
* @param {SignTypedDataRequest} signTypedDataRequest Sign typed data for end user request
|
|
@@ -3621,7 +3690,7 @@ declare const SigningApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
|
3621
3690
|
*/
|
|
3622
3691
|
declare const SigningApiFp: (configuration?: Configuration) => {
|
|
3623
3692
|
/**
|
|
3624
|
-
* Generates a challenge for signing a message from a specified user-controlled wallet. This endpoint supports Ethereum-based blockchains (using EIP-191), Solana and Aptos (using Ed25519 signatures). Note that Smart Contract Accounts (SCA) are specific to Ethereum and EVM-compatible chains. The difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/.
|
|
3693
|
+
* Generates a challenge for signing a message from a specified user-controlled wallet. This endpoint supports Ethereum-based blockchains (using EIP-191), Solana and Aptos (using Ed25519 signatures). Note that Smart Contract Accounts (SCA) are specific to Ethereum and EVM-compatible chains. The difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
3625
3694
|
* @summary Create a challenge to sign message
|
|
3626
3695
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3627
3696
|
* @param {SignMessageRequest} signMessageRequest Sign message for end user request
|
|
@@ -3631,7 +3700,7 @@ declare const SigningApiFp: (configuration?: Configuration) => {
|
|
|
3631
3700
|
*/
|
|
3632
3701
|
signUserMessage(xUserToken: string, signMessageRequest: SignMessageRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Signature>>;
|
|
3633
3702
|
/**
|
|
3634
|
-
* Generate a challenge for signing the transaction from a specific user-controlled wallet.
|
|
3703
|
+
* Generate a challenge for signing the transaction from a specific user-controlled wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body. NOTE: This endpoint supports the following blockchains: SOL, SOL-DEVNET, EVM, EVM-TESTNET. Each chain defines its own standard. For more details, see [Signing APIs](https://developers.circle.com/w3s/signing-apis).
|
|
3635
3704
|
* @summary Create a challenge to sign transaction
|
|
3636
3705
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3637
3706
|
* @param {SignUserTransactionRequest} signUserTransactionRequest Schema for the request payload to sign a transaction.
|
|
@@ -3641,7 +3710,7 @@ declare const SigningApiFp: (configuration?: Configuration) => {
|
|
|
3641
3710
|
*/
|
|
3642
3711
|
signUserTransaction(xUserToken: string, signUserTransactionRequest: SignUserTransactionRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SignTransactionResponse>>;
|
|
3643
3712
|
/**
|
|
3644
|
-
* Generates a challenge for signing the EIP-712 typed structured data from a specified user-controlled wallet. This endpoint only supports Ethereum and EVM-compatible blockchains. Please note that not all Dapps currently support Smart Contract Accounts (SCA); the difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/.
|
|
3713
|
+
* Generates a challenge for signing the EIP-712 typed structured data from a specified user-controlled wallet. This endpoint only supports Ethereum and EVM-compatible blockchains. Please note that not all Dapps currently support Smart Contract Accounts (SCA); the difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
3645
3714
|
* @summary Create a challenge to sign typed data
|
|
3646
3715
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3647
3716
|
* @param {SignTypedDataRequest} signTypedDataRequest Sign typed data for end user request
|
|
@@ -3657,7 +3726,7 @@ declare const SigningApiFp: (configuration?: Configuration) => {
|
|
|
3657
3726
|
*/
|
|
3658
3727
|
declare const SigningApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
3659
3728
|
/**
|
|
3660
|
-
* Generates a challenge for signing a message from a specified user-controlled wallet. This endpoint supports Ethereum-based blockchains (using EIP-191), Solana and Aptos (using Ed25519 signatures). Note that Smart Contract Accounts (SCA) are specific to Ethereum and EVM-compatible chains. The difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/.
|
|
3729
|
+
* Generates a challenge for signing a message from a specified user-controlled wallet. This endpoint supports Ethereum-based blockchains (using EIP-191), Solana and Aptos (using Ed25519 signatures). Note that Smart Contract Accounts (SCA) are specific to Ethereum and EVM-compatible chains. The difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
3661
3730
|
* @summary Create a challenge to sign message
|
|
3662
3731
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3663
3732
|
* @param {SignMessageRequest} signMessageRequest Sign message for end user request
|
|
@@ -3667,7 +3736,7 @@ declare const SigningApiFactory: (configuration?: Configuration, basePath?: stri
|
|
|
3667
3736
|
*/
|
|
3668
3737
|
signUserMessage(xUserToken: string, signMessageRequest: SignMessageRequest, xRequestId?: string, options?: any): AxiosPromise<Signature>;
|
|
3669
3738
|
/**
|
|
3670
|
-
* Generate a challenge for signing the transaction from a specific user-controlled wallet.
|
|
3739
|
+
* Generate a challenge for signing the transaction from a specific user-controlled wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body. NOTE: This endpoint supports the following blockchains: SOL, SOL-DEVNET, EVM, EVM-TESTNET. Each chain defines its own standard. For more details, see [Signing APIs](https://developers.circle.com/w3s/signing-apis).
|
|
3671
3740
|
* @summary Create a challenge to sign transaction
|
|
3672
3741
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3673
3742
|
* @param {SignUserTransactionRequest} signUserTransactionRequest Schema for the request payload to sign a transaction.
|
|
@@ -3677,7 +3746,7 @@ declare const SigningApiFactory: (configuration?: Configuration, basePath?: stri
|
|
|
3677
3746
|
*/
|
|
3678
3747
|
signUserTransaction(xUserToken: string, signUserTransactionRequest: SignUserTransactionRequest, xRequestId?: string, options?: any): AxiosPromise<SignTransactionResponse>;
|
|
3679
3748
|
/**
|
|
3680
|
-
* Generates a challenge for signing the EIP-712 typed structured data from a specified user-controlled wallet. This endpoint only supports Ethereum and EVM-compatible blockchains. Please note that not all Dapps currently support Smart Contract Accounts (SCA); the difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/.
|
|
3749
|
+
* Generates a challenge for signing the EIP-712 typed structured data from a specified user-controlled wallet. This endpoint only supports Ethereum and EVM-compatible blockchains. Please note that not all Dapps currently support Smart Contract Accounts (SCA); the difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
3681
3750
|
* @summary Create a challenge to sign typed data
|
|
3682
3751
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3683
3752
|
* @param {SignTypedDataRequest} signTypedDataRequest Sign typed data for end user request
|
|
@@ -3695,7 +3764,7 @@ declare const SigningApiFactory: (configuration?: Configuration, basePath?: stri
|
|
|
3695
3764
|
*/
|
|
3696
3765
|
declare class SigningApi extends BaseAPI {
|
|
3697
3766
|
/**
|
|
3698
|
-
* Generates a challenge for signing a message from a specified user-controlled wallet. This endpoint supports Ethereum-based blockchains (using EIP-191), Solana and Aptos (using Ed25519 signatures). Note that Smart Contract Accounts (SCA) are specific to Ethereum and EVM-compatible chains. The difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/.
|
|
3767
|
+
* Generates a challenge for signing a message from a specified user-controlled wallet. This endpoint supports Ethereum-based blockchains (using EIP-191), Solana and Aptos (using Ed25519 signatures). Note that Smart Contract Accounts (SCA) are specific to Ethereum and EVM-compatible chains. The difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
3699
3768
|
* @summary Create a challenge to sign message
|
|
3700
3769
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3701
3770
|
* @param {SignMessageRequest} signMessageRequest Sign message for end user request
|
|
@@ -3706,7 +3775,7 @@ declare class SigningApi extends BaseAPI {
|
|
|
3706
3775
|
*/
|
|
3707
3776
|
signUserMessage(xUserToken: string, signMessageRequest: SignMessageRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<axios.AxiosResponse<Signature, any, {}>>;
|
|
3708
3777
|
/**
|
|
3709
|
-
* Generate a challenge for signing the transaction from a specific user-controlled wallet.
|
|
3778
|
+
* Generate a challenge for signing the transaction from a specific user-controlled wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body. NOTE: This endpoint supports the following blockchains: SOL, SOL-DEVNET, EVM, EVM-TESTNET. Each chain defines its own standard. For more details, see [Signing APIs](https://developers.circle.com/w3s/signing-apis).
|
|
3710
3779
|
* @summary Create a challenge to sign transaction
|
|
3711
3780
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3712
3781
|
* @param {SignUserTransactionRequest} signUserTransactionRequest Schema for the request payload to sign a transaction.
|
|
@@ -3717,7 +3786,7 @@ declare class SigningApi extends BaseAPI {
|
|
|
3717
3786
|
*/
|
|
3718
3787
|
signUserTransaction(xUserToken: string, signUserTransactionRequest: SignUserTransactionRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<axios.AxiosResponse<SignTransactionResponse, any, {}>>;
|
|
3719
3788
|
/**
|
|
3720
|
-
* Generates a challenge for signing the EIP-712 typed structured data from a specified user-controlled wallet. This endpoint only supports Ethereum and EVM-compatible blockchains. Please note that not all Dapps currently support Smart Contract Accounts (SCA); the difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/.
|
|
3789
|
+
* Generates a challenge for signing the EIP-712 typed structured data from a specified user-controlled wallet. This endpoint only supports Ethereum and EVM-compatible blockchains. Please note that not all Dapps currently support Smart Contract Accounts (SCA); the difference between Ethereum\'s EOA and SCA can be found in the [account types guide](https://developers.circle.com/wallets/account-types). You can also check the list of Ethereum Dapps that support SCA: https://eip1271.io/. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
3721
3790
|
* @summary Create a challenge to sign typed data
|
|
3722
3791
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
3723
3792
|
* @param {SignTypedDataRequest} signTypedDataRequest Sign typed data for end user request
|
|
@@ -4020,7 +4089,7 @@ declare const TransactionsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
4020
4089
|
*/
|
|
4021
4090
|
createUserTransactionCancelChallenge: (xUserToken: string, id: string, cancelTransactionForEndUserRequest: CancelTransactionForEndUserRequest, xRequestId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4022
4091
|
/**
|
|
4023
|
-
* Generates a challenge for creating a transaction which executes a smart contract. ABI parameters must be passed in the request.
|
|
4092
|
+
* Generates a challenge for creating a transaction which executes a smart contract. ABI parameters must be passed in the request. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4024
4093
|
* @summary Create a challenge for contract execution
|
|
4025
4094
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4026
4095
|
* @param {CreateContractExecutionTransactionForEndUserRequest} createContractExecutionTransactionForEndUserRequest Create transaction for end user request
|
|
@@ -4030,7 +4099,7 @@ declare const TransactionsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
4030
4099
|
*/
|
|
4031
4100
|
createUserTransactionContractExecutionChallenge: (xUserToken: string, createContractExecutionTransactionForEndUserRequest: CreateContractExecutionTransactionForEndUserRequest, xRequestId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4032
4101
|
/**
|
|
4033
|
-
* Generates a challenge for initiating an on-chain digital asset transfer from a specified user-controlled wallet
|
|
4102
|
+
* Generates a challenge for initiating an on-chain digital asset transfer from a specified user-controlled wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4034
4103
|
* @summary Create a challenge for a transfer
|
|
4035
4104
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4036
4105
|
* @param {CreateTransferTransactionForEndUserRequest} createTransferTransactionForEndUserRequest Create transaction for end user request
|
|
@@ -4040,7 +4109,7 @@ declare const TransactionsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
4040
4109
|
*/
|
|
4041
4110
|
createUserTransactionTransferChallenge: (xUserToken: string, createTransferTransactionForEndUserRequest: CreateTransferTransactionForEndUserRequest, xRequestId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4042
4111
|
/**
|
|
4043
|
-
* Generates a challenge to create a transaction that upgrades a wallet.
|
|
4112
|
+
* Generates a challenge to create a transaction that upgrades a wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4044
4113
|
* @summary Create a challenge for a wallet upgrade
|
|
4045
4114
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4046
4115
|
* @param {CreateWalletUpgradeTransactionForEndUserRequest} createWalletUpgradeTransactionForEndUserRequest Creates a transaction for an end-user request.
|
|
@@ -4151,7 +4220,7 @@ declare const TransactionsApiFp: (configuration?: Configuration) => {
|
|
|
4151
4220
|
*/
|
|
4152
4221
|
createUserTransactionCancelChallenge(xUserToken: string, id: string, cancelTransactionForEndUserRequest: CancelTransactionForEndUserRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CancelTransactionForEndUserResponse>>;
|
|
4153
4222
|
/**
|
|
4154
|
-
* Generates a challenge for creating a transaction which executes a smart contract. ABI parameters must be passed in the request.
|
|
4223
|
+
* Generates a challenge for creating a transaction which executes a smart contract. ABI parameters must be passed in the request. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4155
4224
|
* @summary Create a challenge for contract execution
|
|
4156
4225
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4157
4226
|
* @param {CreateContractExecutionTransactionForEndUserRequest} createContractExecutionTransactionForEndUserRequest Create transaction for end user request
|
|
@@ -4161,7 +4230,7 @@ declare const TransactionsApiFp: (configuration?: Configuration) => {
|
|
|
4161
4230
|
*/
|
|
4162
4231
|
createUserTransactionContractExecutionChallenge(xUserToken: string, createContractExecutionTransactionForEndUserRequest: CreateContractExecutionTransactionForEndUserRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateContractExecutionTransactionForEndUserResponse>>;
|
|
4163
4232
|
/**
|
|
4164
|
-
* Generates a challenge for initiating an on-chain digital asset transfer from a specified user-controlled wallet
|
|
4233
|
+
* Generates a challenge for initiating an on-chain digital asset transfer from a specified user-controlled wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4165
4234
|
* @summary Create a challenge for a transfer
|
|
4166
4235
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4167
4236
|
* @param {CreateTransferTransactionForEndUserRequest} createTransferTransactionForEndUserRequest Create transaction for end user request
|
|
@@ -4171,7 +4240,7 @@ declare const TransactionsApiFp: (configuration?: Configuration) => {
|
|
|
4171
4240
|
*/
|
|
4172
4241
|
createUserTransactionTransferChallenge(xUserToken: string, createTransferTransactionForEndUserRequest: CreateTransferTransactionForEndUserRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateTransferTransactionForEndUserResponse>>;
|
|
4173
4242
|
/**
|
|
4174
|
-
* Generates a challenge to create a transaction that upgrades a wallet.
|
|
4243
|
+
* Generates a challenge to create a transaction that upgrades a wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4175
4244
|
* @summary Create a challenge for a wallet upgrade
|
|
4176
4245
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4177
4246
|
* @param {CreateWalletUpgradeTransactionForEndUserRequest} createWalletUpgradeTransactionForEndUserRequest Creates a transaction for an end-user request.
|
|
@@ -4282,7 +4351,7 @@ declare const TransactionsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
4282
4351
|
*/
|
|
4283
4352
|
createUserTransactionCancelChallenge(xUserToken: string, id: string, cancelTransactionForEndUserRequest: CancelTransactionForEndUserRequest, xRequestId?: string, options?: any): AxiosPromise<CancelTransactionForEndUserResponse>;
|
|
4284
4353
|
/**
|
|
4285
|
-
* Generates a challenge for creating a transaction which executes a smart contract. ABI parameters must be passed in the request.
|
|
4354
|
+
* Generates a challenge for creating a transaction which executes a smart contract. ABI parameters must be passed in the request. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4286
4355
|
* @summary Create a challenge for contract execution
|
|
4287
4356
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4288
4357
|
* @param {CreateContractExecutionTransactionForEndUserRequest} createContractExecutionTransactionForEndUserRequest Create transaction for end user request
|
|
@@ -4292,7 +4361,7 @@ declare const TransactionsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
4292
4361
|
*/
|
|
4293
4362
|
createUserTransactionContractExecutionChallenge(xUserToken: string, createContractExecutionTransactionForEndUserRequest: CreateContractExecutionTransactionForEndUserRequest, xRequestId?: string, options?: any): AxiosPromise<CreateContractExecutionTransactionForEndUserResponse>;
|
|
4294
4363
|
/**
|
|
4295
|
-
* Generates a challenge for initiating an on-chain digital asset transfer from a specified user-controlled wallet
|
|
4364
|
+
* Generates a challenge for initiating an on-chain digital asset transfer from a specified user-controlled wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4296
4365
|
* @summary Create a challenge for a transfer
|
|
4297
4366
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4298
4367
|
* @param {CreateTransferTransactionForEndUserRequest} createTransferTransactionForEndUserRequest Create transaction for end user request
|
|
@@ -4302,7 +4371,7 @@ declare const TransactionsApiFactory: (configuration?: Configuration, basePath?:
|
|
|
4302
4371
|
*/
|
|
4303
4372
|
createUserTransactionTransferChallenge(xUserToken: string, createTransferTransactionForEndUserRequest: CreateTransferTransactionForEndUserRequest, xRequestId?: string, options?: any): AxiosPromise<CreateTransferTransactionForEndUserResponse>;
|
|
4304
4373
|
/**
|
|
4305
|
-
* Generates a challenge to create a transaction that upgrades a wallet.
|
|
4374
|
+
* Generates a challenge to create a transaction that upgrades a wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4306
4375
|
* @summary Create a challenge for a wallet upgrade
|
|
4307
4376
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4308
4377
|
* @param {CreateWalletUpgradeTransactionForEndUserRequest} createWalletUpgradeTransactionForEndUserRequest Creates a transaction for an end-user request.
|
|
@@ -4419,7 +4488,7 @@ declare class TransactionsApi extends BaseAPI {
|
|
|
4419
4488
|
*/
|
|
4420
4489
|
createUserTransactionCancelChallenge(xUserToken: string, id: string, cancelTransactionForEndUserRequest: CancelTransactionForEndUserRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<axios.AxiosResponse<CancelTransactionForEndUserResponse, any, {}>>;
|
|
4421
4490
|
/**
|
|
4422
|
-
* Generates a challenge for creating a transaction which executes a smart contract. ABI parameters must be passed in the request.
|
|
4491
|
+
* Generates a challenge for creating a transaction which executes a smart contract. ABI parameters must be passed in the request. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4423
4492
|
* @summary Create a challenge for contract execution
|
|
4424
4493
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4425
4494
|
* @param {CreateContractExecutionTransactionForEndUserRequest} createContractExecutionTransactionForEndUserRequest Create transaction for end user request
|
|
@@ -4430,7 +4499,7 @@ declare class TransactionsApi extends BaseAPI {
|
|
|
4430
4499
|
*/
|
|
4431
4500
|
createUserTransactionContractExecutionChallenge(xUserToken: string, createContractExecutionTransactionForEndUserRequest: CreateContractExecutionTransactionForEndUserRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<axios.AxiosResponse<CreateContractExecutionTransactionForEndUserResponse, any, {}>>;
|
|
4432
4501
|
/**
|
|
4433
|
-
* Generates a challenge for initiating an on-chain digital asset transfer from a specified user-controlled wallet
|
|
4502
|
+
* Generates a challenge for initiating an on-chain digital asset transfer from a specified user-controlled wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4434
4503
|
* @summary Create a challenge for a transfer
|
|
4435
4504
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4436
4505
|
* @param {CreateTransferTransactionForEndUserRequest} createTransferTransactionForEndUserRequest Create transaction for end user request
|
|
@@ -4441,7 +4510,7 @@ declare class TransactionsApi extends BaseAPI {
|
|
|
4441
4510
|
*/
|
|
4442
4511
|
createUserTransactionTransferChallenge(xUserToken: string, createTransferTransactionForEndUserRequest: CreateTransferTransactionForEndUserRequest, xRequestId?: string, options?: AxiosRequestConfig): Promise<axios.AxiosResponse<CreateTransferTransactionForEndUserResponse, any, {}>>;
|
|
4443
4512
|
/**
|
|
4444
|
-
* Generates a challenge to create a transaction that upgrades a wallet.
|
|
4513
|
+
* Generates a challenge to create a transaction that upgrades a wallet. To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.
|
|
4445
4514
|
* @summary Create a challenge for a wallet upgrade
|
|
4446
4515
|
* @param {string} xUserToken Unique system generated JWT session token for specific user.
|
|
4447
4516
|
* @param {CreateWalletUpgradeTransactionForEndUserRequest} createWalletUpgradeTransactionForEndUserRequest Creates a transaction for an end-user request.
|
|
@@ -7,7 +7,7 @@ export { BadGatewayError, BadRequestError, ConnectionAbortedError, ConnectionRef
|
|
|
7
7
|
import * as _shared_clients_user_controlled_wallets from './clients/user-controlled-wallets';
|
|
8
8
|
import { TokenBlockchain, UserControlledWalletsClient, Blockchain, WalletMetadata, AccountType, FeeLevel, ContractExecutionBlockchain, TransactionType, ListTransactionsOperationEnum, TransactionState, ListTransactionsOrderEnum, ListUsersPinStatusEnum, ListUsersSecurityQuestionStatusEnum, ListUsersOrderEnum, ListUserChallengesStatusEnum, TokenStandard, ScaCore, ListWalletsOrderEnum, UserTokenResponseData } from './clients/user-controlled-wallets';
|
|
9
9
|
export { AbiParametersInner, AccelerateTransactionForEndUserRequest, AccelerateTransactionForEndUserResponse, AccountType, Balance, Balances, BalancesData, BaseScreeningDecision, Blockchain, CancelTransactionForEndUserRequest, CancelTransactionForEndUserResponse, Challenge, ChallengeResponse, ChallengeResponseData, ChallengeStatusEnum, ChallengeTypeEnum, Challenges, ChallengesData, ContractExecutionBlockchain, CreateContractExecutionTransactionForEndUserRequest, CreateContractExecutionTransactionForEndUserResponse, CreateEndUserWallet, CreateEndUserWalletRequest, CreateTransferTransactionForEndUserRequest, CreateTransferTransactionForEndUserResponse, CreateUserRequest, CreateWalletUpgradeTransactionForEndUserRequest, CreateWalletUpgradeTransactionForEndUserResponse, CustodyType, DeviceTokenEmail, DeviceTokenEmailData, DeviceTokenEmailRequest, DeviceTokenSocial, DeviceTokenSocialData, DeviceTokenSocialRequest, EOAWallet, EndUser, EndUserSecurityQuestionStatusEnum, EndUserStatus, EstimateContractExecutionTransactionFeeRequest, EstimateTransactionFee, EstimateTransactionFeeData, EstimateTransferTransactionFeeRequest, FeeLevel, GetLowestNonceTransactionResponse, GetUserByIDResponse, GetUserByIDResponseData, ListTransactionsOperationEnum, ListUserChallengesStatusEnum, ListUsersPinStatusEnum, ListUsersSecurityQuestionStatusEnum, NewScaCore, Nft, Nfts, NftsData, Operation, Pin, PinData, PinSecurityDetails, PinStatus, RefreshUserToken, RefreshUserTokenData, RefreshUserTokenRequest, ResendOTPRequest, ResentOTP, ResentOTPData, RiskAction, RiskCategory, RiskScore, RiskSignal, RiskSignalSourceEnum, RiskType, SCAWallet, ScaCore, SetPinAndInitWalletRequest, SetPinRequest, SignMessageRequest, SignTransactionResponse, SignTypedDataRequest, SignUserTransactionRequest, Signature, TokenBlockchain, TokenResponse, TokenResponseData, TokenStandard, Transaction, TransactionFee, TransactionResponse, TransactionResponseData, TransactionScreeningDecision, TransactionState, TransactionType, Transactions, TransactionsData, UpdateWalletRequest, UserResponse, UserTokenRequest, UserTokenResponse, UserTokenResponseData, Users, UsersData, ValidateAddress, ValidateAddressData, ValidateAddressRequest, Wallet, WalletMetadata, WalletResponse, WalletResponseData, WalletResponseDataWallet, WalletState, Wallets, WalletsData } from './clients/user-controlled-wallets';
|
|
10
|
-
export * from './clients/core
|
|
10
|
+
export * from './clients/core';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Represents input parameters for identifying a user using a JWT token.
|
|
@@ -88,12 +88,22 @@ type CreateUserPinWithWalletsInput = {
|
|
|
88
88
|
} & UserIdOrTokenInput & WithIdempotencyKey & Common;
|
|
89
89
|
/**
|
|
90
90
|
* Represents the input to sign the EIP-191 message from a specified user-controlled wallet.
|
|
91
|
+
*
|
|
92
|
+
* To identify the wallet, provide either `walletId`, or both `walletAddress` and `blockchain`.
|
|
91
93
|
*/
|
|
92
94
|
type SignMessageInput = {
|
|
93
95
|
/**
|
|
94
96
|
* Unique system generated identifier of the wallet.
|
|
95
97
|
*/
|
|
96
|
-
walletId
|
|
98
|
+
walletId?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The blockchain address of the wallet. Use together with `blockchain` as an alternative to `walletId`.
|
|
101
|
+
*/
|
|
102
|
+
walletAddress?: string;
|
|
103
|
+
/**
|
|
104
|
+
* The blockchain associated with the signing. Use together with `walletAddress` as an alternative to `walletId`.
|
|
105
|
+
*/
|
|
106
|
+
blockchain?: string;
|
|
97
107
|
/**
|
|
98
108
|
* Indicator of whether the input message is encoded by hex. If TRUE, then the message should be a hex string. By default, it is False.
|
|
99
109
|
*/
|
|
@@ -109,13 +119,23 @@ type SignMessageInput = {
|
|
|
109
119
|
memo?: string;
|
|
110
120
|
} & UserIdOrTokenInput & Common;
|
|
111
121
|
/**
|
|
112
|
-
* Represents the input to sign
|
|
122
|
+
* Represents the input to sign a transaction from a specified user-controlled wallet.
|
|
123
|
+
*
|
|
124
|
+
* To identify the wallet, provide either `walletId`, or both `walletAddress` and `blockchain`.
|
|
113
125
|
*/
|
|
114
126
|
type SignTransactionInput = {
|
|
115
127
|
/**
|
|
116
128
|
* System-generated unique identifier of the resource.
|
|
117
129
|
*/
|
|
118
|
-
walletId
|
|
130
|
+
walletId?: string;
|
|
131
|
+
/**
|
|
132
|
+
* The blockchain address of the wallet. Use together with `blockchain` as an alternative to `walletId`.
|
|
133
|
+
*/
|
|
134
|
+
walletAddress?: string;
|
|
135
|
+
/**
|
|
136
|
+
* The blockchain associated with the signing. Use together with `walletAddress` as an alternative to `walletId`.
|
|
137
|
+
*/
|
|
138
|
+
blockchain?: string;
|
|
119
139
|
/**
|
|
120
140
|
* Raw transaction string that needs to be signed. Excluded with `transaction`. Required without `transaction`.
|
|
121
141
|
*
|
|
@@ -135,12 +155,22 @@ type SignTransactionInput = {
|
|
|
135
155
|
} & UserIdOrTokenInput & Common;
|
|
136
156
|
/**
|
|
137
157
|
* Represents the input to sign the EIP-712 typed structured data from a specified user-controlled wallet.
|
|
158
|
+
*
|
|
159
|
+
* To identify the wallet, provide either `walletId`, or both `walletAddress` and `blockchain`.
|
|
138
160
|
*/
|
|
139
161
|
type SignTypedDataInput = {
|
|
140
162
|
/**
|
|
141
163
|
* Unique system generated identifier of the wallet.
|
|
142
164
|
*/
|
|
143
|
-
walletId
|
|
165
|
+
walletId?: string;
|
|
166
|
+
/**
|
|
167
|
+
* The blockchain address of the wallet. Use together with `blockchain` as an alternative to `walletId`.
|
|
168
|
+
*/
|
|
169
|
+
walletAddress?: string;
|
|
170
|
+
/**
|
|
171
|
+
* The blockchain associated with the signing. Use together with `walletAddress` as an alternative to `walletId`.
|
|
172
|
+
*/
|
|
173
|
+
blockchain?: string;
|
|
144
174
|
/**
|
|
145
175
|
* A string represents the typed structured data in EIP-712.
|
|
146
176
|
*/
|
|
@@ -179,6 +209,8 @@ type CancelTransactionInput = {
|
|
|
179
209
|
} & UserIdOrTokenInput & WithIdempotencyKey & Common;
|
|
180
210
|
/**
|
|
181
211
|
* Defines the parameters for creating a new transaction.
|
|
212
|
+
*
|
|
213
|
+
* To identify the wallet, provide either `walletId`, or both `walletAddress` and `blockchain`.
|
|
182
214
|
*/
|
|
183
215
|
type CreateTransactionInput = {
|
|
184
216
|
/**
|
|
@@ -192,7 +224,18 @@ type CreateTransactionInput = {
|
|
|
192
224
|
/**
|
|
193
225
|
* Identifier for the originating wallet.
|
|
194
226
|
*/
|
|
195
|
-
walletId
|
|
227
|
+
walletId?: string;
|
|
228
|
+
/**
|
|
229
|
+
* The blockchain address of the wallet. Use together with `blockchain` as an alternative to `walletId`.
|
|
230
|
+
*/
|
|
231
|
+
walletAddress?: string;
|
|
232
|
+
/**
|
|
233
|
+
* The blockchain associated with the transfer. Use together with `walletAddress` as an alternative to `walletId`.
|
|
234
|
+
*
|
|
235
|
+
* Note: this single field is also accepted by the API as the token's blockchain when `tokenAddress` is used —
|
|
236
|
+
* transfer transactions can only happen on chains that support tokens, so the type is narrowed to `TokenBlockchain`.
|
|
237
|
+
*/
|
|
238
|
+
blockchain?: TokenBlockchain;
|
|
196
239
|
/**
|
|
197
240
|
* The list of NFT IDs to be transferred/batchTransferred for NFT withdrawal.
|
|
198
241
|
* Note: Only erc1155 supports safeBatchTransferFrom.
|
|
@@ -206,7 +249,7 @@ type CreateTransactionInput = {
|
|
|
206
249
|
* Configuration to determine the fees that will be paid.
|
|
207
250
|
*/
|
|
208
251
|
fee: FeeConfiguration<FeeLevel>;
|
|
209
|
-
} & UserIdOrTokenInput & TokenInfo & WithIdempotencyKey & Common;
|
|
252
|
+
} & UserIdOrTokenInput & Omit<TokenInfo, 'blockchain'> & WithIdempotencyKey & Common;
|
|
210
253
|
/**
|
|
211
254
|
* Represents the input parameters for creating a new contract execution transaction.
|
|
212
255
|
*/
|
|
@@ -252,7 +295,19 @@ type CreateContractExecutionTransactionInput = ({
|
|
|
252
295
|
/**
|
|
253
296
|
* Unique system generated identifier of the wallet. Required when source Address and blockchain is not provided. Mutually exclusive. For contract deploys this wallet ID will be used as the source.
|
|
254
297
|
*/
|
|
255
|
-
walletId
|
|
298
|
+
walletId?: string;
|
|
299
|
+
/**
|
|
300
|
+
* The blockchain address of the wallet. Use together with `blockchain` as an alternative to `walletId`.
|
|
301
|
+
*/
|
|
302
|
+
walletAddress?: string;
|
|
303
|
+
/**
|
|
304
|
+
* The blockchain associated with the contract execution. Use together with `walletAddress` as an alternative to `walletId`.
|
|
305
|
+
*
|
|
306
|
+
* Note: This field uses `ContractExecutionBlockchain` (a narrower set) rather than the free-form `string`
|
|
307
|
+
* used by sibling inputs (`SignMessageInput`, `SignTransactionInput`, etc.), because contract execution
|
|
308
|
+
* is only supported on specific blockchains.
|
|
309
|
+
*/
|
|
310
|
+
blockchain?: ContractExecutionBlockchain;
|
|
256
311
|
/**
|
|
257
312
|
* Configuration that determines the fees that will be paid.
|
|
258
313
|
*/
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
Private-Lines: `+c+`\r
|
|
44
44
|
`,i+=u;var b=Tl("putty-private-key-file-mac-key",t),E=et.util.createBuffer();na(E,r),na(E,n),na(E,a),E.putInt32(s.length()),E.putBuffer(s),E.putInt32(l.length()),E.putBuffer(l);var I=et.hmac.create();return I.start("sha1",b),I.update(E.bytes()),i+=`\r
|
|
45
45
|
Private-MAC: `+I.digest().toHex()+`\r
|
|
46
|
-
`,i},Cl.publicKeyToOpenSSH=function(e,t){var a="ssh-rsa";t=t||"";var r=et.util.createBuffer();return na(r,a),Jt(r,e.e),Jt(r,e.n),a+" "+et.util.encode64(r.bytes())+" "+t},Cl.privateKeyToOpenSSH=function(e,t){return t?et.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):et.pki.privateKeyToPem(e)},Cl.getPublicKeyFingerprint=function(e,t){t=t||{};var a=t.md||et.md.md5.create(),r="ssh-rsa",n=et.util.createBuffer();na(n,r),Jt(n,e.e),Jt(n,e.n),a.start(),a.update(n.getBytes());var i=a.digest();if(t.encoding==="hex"){var s=i.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i};function Jt(e,t){var a=t.toString(16);a[0]>="8"&&(a="00"+a);var r=et.util.hexToBytes(a);e.putInt32(r.length),e.putBytes(r)}function na(e,t){e.putInt32(t.length),e.putString(t)}function Tl(){for(var e=et.md.sha1.create(),t=arguments.length,a=0;a<t;++a)e.update(arguments[a]);return e.digest()}const Ut=()=>Or.randomUUID(),KT=({configurationsClient:e})=>async t=>{try{return await e.Faucet.requestTestnetTokens(void 0,t)}catch(a){throw re(a)?te(a):a}};var ah="10.4.0";const nh=({client:e})=>async({xRequestId:t,...a})=>{try{return ae(await e.PINAuthentication.getUserToken({...a},t))}catch(r){throw re(r)?te(r):r}},We=async(e,t,a=!1)=>{let r;return e.storage&&(r=await e.storage.get("userToken:"+t)),!a&&r?.userToken!=null&&r.expirationTime>Date.now()?r.userToken:await zT(e,t)};async function zT(e,t){const a=await nh(e)({userId:t});if(!a.data?.userToken)throw new Error("Could not fetch user token");return e.storage&&await e.storage.set("userToken:"+t,{...a.data,expirationTime:Date.now()+3e3*1e3}),a.data.userToken}const HT=e=>async({userToken:t,userId:a,idempotencyKey:r,xRequestId:n})=>{try{return ae(await e.client.PINAuthentication.createUserPinChallenge(t??await We(e,a),{idempotencyKey:r??Ut()},n))}catch(i){throw re(i)?te(i):i}},$T=e=>async({userToken:t,userId:a,idempotencyKey:r,accountType:n="EOA",xRequestId:i,...s})=>{try{return ae(await e.client.Users.createUserWithPinChallenge(t??await We(e,a),{idempotencyKey:r??Ut(),accountType:n,...s},i))}catch(o){throw re(o)?te(o):o}},GT=e=>async({userToken:t,userId:a,idempotencyKey:r,xRequestId:n})=>{try{return ae(await e.client.PINAuthentication.createUserPinRestoreChallenge(t??await We(e,a),{idempotencyKey:r??Ut()},n))}catch(i){throw re(i)?te(i):i}},WT=e=>async({userToken:t,userId:a,idempotencyKey:r})=>{try{return ae(await e.client.PINAuthentication.updateUserPinChallenge(t??await We(e,a),{idempotencyKey:r??Ut()}))}catch(n){throw re(n)?te(n):n}},XT=e=>async({userToken:t,userId:a,xRequestId:r,...n})=>{try{return ae(await e.client.Signing.signUserMessage(t??await We(e,a),n,r))}catch(i){throw re(i)?te(i):i}},QT=e=>async({userToken:t,userId:a,xRequestId:r,...n})=>{try{return ae(await e.client.Signing.signUserTransaction(t??await We(e,a),{...n},r))}catch(i){throw re(i)?te(i):i}},YT=e=>async({userToken:t,userId:a,xRequestId:r,...n})=>{try{return ae(await e.client.Signing.signUserTypedData(t??await We(e,a),n,r))}catch(i){throw re(i)?te(i):i}},JT=({client:e})=>async({id:t})=>{try{return ae(await e.TokenLookup.getTokenId(t))}catch(a){throw re(a)?te(a):a}},ZT=e=>async({userToken:t,userId:a,id:r,idempotencyKey:n,xRequestId:i})=>{try{return ae(await e.client.Transactions.createUserTransactionAccelerateChallenge(t??await We(e,a),r,{idempotencyKey:n??Ut()},i))}catch(s){throw re(s)?te(s):s}},e2=e=>async({userToken:t,userId:a,id:r,idempotencyKey:n,xRequestId:i})=>{try{return ae(await e.client.Transactions.createUserTransactionCancelChallenge(t??await We(e,a),r,{idempotencyKey:n??Ut()},i))}catch(s){throw re(s)?te(s):s}},t2=e=>async({userToken:t,userId:a,idempotencyKey:r,fee:n,xRequestId:i,...s})=>{try{return ae(await e.client.Transactions.createUserTransactionTransferChallenge(t??await We(e,a),{idempotencyKey:r??Ut(),...n.config,...s},i))}catch(o){throw re(o)?te(o):o}},r2=e=>async({userToken:t,userId:a,idempotencyKey:r,fee:n,xRequestId:i,...s})=>{try{return ae(await e.client.Transactions.createUserTransactionContractExecutionChallenge(t??await We(e,a),{idempotencyKey:r??Ut(),...n.config,...s},i))}catch(o){throw re(o)?te(o):o}},a2=e=>async({userId:t,userToken:a,source:r,xRequestId:n,...i})=>{try{return ae(await e.client.Transactions.createTransactionEstimateFee(a??await We(e,t),{...i,...r},n))}catch(s){throw re(s)?te(s):s}},n2=e=>async({userToken:t,userId:a,amount:r,xRequestId:n,...i})=>{try{return ae(await e.client.Transactions.createTransferEstimateFee(t??await We(e,a),{amounts:r,...i},n))}catch(s){throw re(s)?te(s):s}},s2=e=>async({id:t,userToken:a,userId:r,txType:n,xRequestId:i})=>{try{return ae(await e.client.Transactions.getTransaction(t,a??await We(e,r),n,i))}catch(s){throw re(s)?te(s):s}},i2=({client:e})=>async({blockchain:t,address:a,walletId:r,xRequestId:n}={})=>{try{return ae(await e.Transactions.getLowestNonceTransaction(t,a,r,{headers:n?{"X-Request-Id":n}:void 0}))}catch(i){throw re(i)?te(i):i}},o2=e=>async({userToken:t,blockchain:a,destinationAddress:r,includeAll:n,operation:i,state:s,txHash:o,txType:c,userId:l,walletIds:u,from:p,pageAfter:d,pageBefore:g,pageSize:h,to:y,order:b,xRequestId:E})=>{try{return ae(await e.client.Transactions.listTransactions(t??await We(e,l),a,r,n,i,s,o,c,l,u?.join(","),p,y,g,d,h,b,E))}catch(I){throw re(I)?te(I):I}},c2=({client:e})=>async t=>{try{return ae(await e.Transactions.createValidateAddress(t))}catch(a){throw re(a)?te(a):a}},l2=({client:e})=>async({...t})=>{try{return ae(await e.PINAuthentication.createUser({...t}))}catch(a){throw re(a)?te(a):a}},u2=e=>async({userToken:t,idempotencyKey:a,userId:r,xRequestId:n,...i})=>{try{return ae(await e.client.SocialEmailAuthentication.resendOTP(t??await We(e,r),{idempotencyKey:a??Ut(),...i},n))}catch(s){throw re(s)?te(s):s}},p2=({client:e})=>async({idempotencyKey:t,xRequestId:a,...r})=>{try{return ae(await e.SocialEmailAuthentication.createDeviceTokenEmailLogin({idempotencyKey:t??Ut(),...r},a))}catch(n){throw re(n)?te(n):n}},d2=({client:e})=>async({userId:t,xRequestId:a})=>{try{return ae(await e.Users.getUser(t,a))}catch(r){throw re(r)?te(r):r}},f2=({client:e})=>async({userToken:t,xRequestId:a})=>{try{return ae(await e.Users.getUserByToken(t,a))}catch(r){throw re(r)?te(r):r}},h2=({client:e})=>async({userToken:t,challengeId:a,xRequestId:r})=>{try{return ae(await e.Users.getUserChallenge(t,a,r))}catch(n){throw re(n)?te(n):n}},m2=({client:e})=>async({pinStatus:t,securityQuestionStatus:a,from:r,to:n,pageBefore:i,pageAfter:s,pageSize:o,order:c,xRequestId:l}={})=>{try{return ae(await e.Users.listUsers(t,a,r,n,i,s,o,c,l))}catch(u){throw re(u)?te(u):u}},v2=({client:e})=>async({userToken:t,challengeStatus:a,xRequestId:r})=>{try{return ae(await e.Users.listUserChallenges(t,a,r))}catch(n){throw re(n)?te(n):n}},g2=e=>async({userId:t,userToken:a,deviceId:r,idempotencyKey:n,refreshToken:i,xRequestId:s})=>{try{return ae(await e.client.SocialEmailAuthentication.refreshUserToken(a??await We(e,t),{idempotencyKey:n??Ut(),refreshToken:i,deviceId:r},s))}catch(o){throw re(o)?te(o):o}},x2=({client:e})=>async({idempotencyKey:t,xRequestId:a,...r})=>{try{return ae(await e.SocialEmailAuthentication.createDeviceTokenSocialLogin({idempotencyKey:t??Ut(),...r},a))}catch(n){throw re(n)?te(n):n}},y2=e=>async({userToken:t,userId:a,idempotencyKey:r,accountType:n="EOA",xRequestId:i,...s})=>{try{return ae(await e.client.Wallets.createUserWallet(t??await We(e,a),{idempotencyKey:r??Ut(),accountType:n,...s},i))}catch(o){throw re(o)?te(o):o}},b2=e=>async({id:t,userToken:a,userId:r,xRequestId:n})=>{try{return ae(await e.client.Wallets.getWallet(t,a??await We(e,r),n))}catch(i){throw re(i)?te(i):i}},E2=e=>async({walletId:t,userToken:a,userId:r,includeAll:n,name:i,pageAfter:s,pageBefore:o,pageSize:c,tokenAddresses:l,standard:u,xRequestId:p})=>{try{return ae(await e.client.Wallets.listWalletNfts(a??await We(e,r),t,n,i,l?.join(","),u,o,s,c,p))}catch(d){throw re(d)?te(d):d}},C2=e=>async({walletId:t,userToken:a,userId:r,includeAll:n,name:i,pageAfter:s,pageBefore:o,pageSize:c,tokenAddresses:l,standard:u,xRequestId:p})=>{try{return ae(await e.client.Wallets.listWalletBalance(a??await We(e,r),t,n,i,l?.join(","),u,o,s,c,p))}catch(d){throw re(d)?te(d):d}},T2=e=>async({userId:t,userToken:a,address:r,blockchain:n,from:i,pageAfter:s,pageBefore:o,pageSize:c,to:l,walletSetId:u,refId:p,scaCore:d,order:g,xRequestId:h})=>{try{return ae(await e.client.Wallets.listWallets(a??await We(e,t),r,n,d,u,p,i,l,o,s,c,g,h))}catch(y){throw re(y)?te(y):y}},S2=e=>async({id:t,name:a,refId:r,userToken:n,userId:i})=>{try{return ae(await e.client.Wallets.updateWallet(t,n??await We(e,i),{name:a,refId:r}))}catch(s){throw re(s)?te(s):s}};var w2=Object.defineProperty,A2=(e,t,a)=>t in e?w2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,I2=(e,t,a)=>A2(e,typeof t!="symbol"?t+"":t,a);const yp="https://api.circle.com";class sh{constructor(t){I2(this,"params");const{apiKey:a,baseUrl:r,storage:n,userAgent:i,headers:s}=t;this.params={client:new Vy(r??yp,{apiKey:a,version:ah,userAgent:i},s),configurationsClient:new py(r??yp,{apiKey:a,version:ah,userAgent:i},s),storage:n??new eb}}createUserPin(t){return HT(this.params)(t)}createUserPinWithWallets(t){return $T(this.params)(t)}updateUserPin(t){return WT(this.params)(t)}restoreUserPin(t){return GT(this.params)(t)}createDeviceTokenForEmailLogin(t){return p2(this.params)(t)}createDeviceTokenForSocialLogin(t){return x2(this.params)(t)}refreshUserToken(t){return g2(this.params)(t)}resendOTP(t){return u2(this.params)(t)}createWallet(t){return y2(this.params)(t)}listWallets(t){return T2(this.params)(t)}getWallet(t){return b2(this.params)(t)}updateWallet(t){return S2(this.params)(t)}getWalletTokenBalance(t){return C2(this.params)(t)}getWalletNFTBalance(t){return E2(this.params)(t)}accelerateTransaction(t){return ZT(this.params)(t)}createTransaction(t){return t2(this.params)(t)}cancelTransaction(t){return e2(this.params)(t)}getTransaction(t){return s2(this.params)(t)}listTransactions(t){return o2(this.params)(t)}estimateContractExecutionFee(t){return a2(this.params)(t)}createUserTransactionContractExecutionChallenge(t){return r2(this.params)(t)}estimateTransferFee(t){return n2(this.params)(t)}validateAddress(t){return c2(this.params)(t)}getLowestNonceTransaction(t){return i2(this.params)(t)}createUser(t){return l2(this.params)(t)}getUser(t){return d2(this.params)(t)}getUserStatus(t){return f2(this.params)(t)}listUsers(t){return m2(this.params)(t)}createUserToken(t){return nh(this.params)(t)}getUserChallenge(t){return h2(this.params)(t)}listUserChallenges(t){return v2(this.params)(t)}getToken(t){return JT(this.params)(t)}signMessage(t){return XT(this.params)(t)}signTransaction(t){return QT(this.params)(t)}signTypedData(t){return YT(this.params)(t)}requestTestnetTokens(t){return KT(this.params)(t)}createMonitoredTokens(t){return V1(this.params)(t)}updateMonitoredTokens(t){return K1(this.params)(t)}listMonitoredTokens(t){return j1(this.params)(t)}deleteMonitoredTokens(t){return M1(this.params)(t)}updateMonitoredTokensScope(t){return z1(this.params)(t)}createSubscription(t){return H1(this.params)(t)}deleteSubscription(t){return $1(this.params)(t)}getSubscription(t){return G1(this.params)(t)}getNotificationSignature(t){return W1(this.params)(t)}listSubscriptions(){return X1(this.params)()}updateSubscription(t){return Q1(this.params)(t)}}function B2(e){return new sh(e)}exports.BadGatewayError=Ia,exports.BadRequestError=ba,exports.Blockchain=Dy,exports.CircleUserControlledWalletsClient=sh,exports.ConnectionAbortedError=Ua,exports.ConnectionRefusedError=ka,exports.ConnectionResetError=Oa,exports.ConnectionTimeoutError=_a,exports.DNSNotFoundError=Na,exports.DNSTimeoutError=La,exports.Error110700=Ru,exports.Error110701=ku,exports.Error110702=_u,exports.Error110703=Uu,exports.Error155101=Fa,exports.Error155102=qa,exports.Error155103=Va,exports.Error155104=Ma,exports.Error155105=ja,exports.Error155106=Ka,exports.Error155107=za,exports.Error155108=Ha,exports.Error155109=$a,exports.Error155110=Ga,exports.Error155111=Wa,exports.Error155112=Xa,exports.Error155113=Qa,exports.Error155114=Ya,exports.Error155115=Ja,exports.Error155116=Za,exports.Error155117=en,exports.Error155118=tn,exports.Error155119=rn,exports.Error155120=an,exports.Error155121=nn,exports.Error155122=sn,exports.Error155123=on,exports.Error155124=cn,exports.Error155130=ln,exports.Error155131=un,exports.Error155132=pn,exports.Error155133=dn,exports.Error155134=fn,exports.Error155135=hn,exports.Error155136=mn,exports.Error155137=vn,exports.Error155138=gn,exports.Error155139=xn,exports.Error155140=yn,exports.Error155141=bn,exports.Error155142=En,exports.Error155143=Cn,exports.Error155144=Tn,exports.Error155145=Sn,exports.Error155146=wn,exports.Error155150=An,exports.Error155151=In,exports.Error155152=Bn,exports.Error155154=Rn,exports.Error155155=kn,exports.Error155156=_n,exports.Error155157=Un,exports.Error155158=Nn,exports.Error155159=Ln,exports.Error155160=Pn,exports.Error155201=On,exports.Error155202=Dn,exports.Error155203=Fn,exports.Error155204=qn,exports.Error155205=Vn,exports.Error155206=Mn,exports.Error155207=jn,exports.Error155208=Kn,exports.Error155209=zn,exports.Error155210=Hn,exports.Error155211=$n,exports.Error155215=Gn,exports.Error155218=Wn,exports.Error155219=Xn,exports.Error155220=Qn,exports.Error155221=Yn,exports.Error155222=Jn,exports.Error155223=Zn,exports.Error155224=es,exports.Error155225=ts,exports.Error155226=rs,exports.Error155227=as,exports.Error155228=ns,exports.Error155229=ss,exports.Error155230=is,exports.Error155231=os,exports.Error155232=cs,exports.Error155233=ls,exports.Error155234=us,exports.Error155235=ps,exports.Error155236=ds,exports.Error155237=fs,exports.Error155238=hs,exports.Error155239=ms,exports.Error155240=vs,exports.Error155241=gs,exports.Error155242=xs,exports.Error155243=ys,exports.Error155244=bs,exports.Error155245=Es,exports.Error155247=Cs,exports.Error155254=Ts,exports.Error155257=Ss,exports.Error155258=ws,exports.Error155262=As,exports.Error155264=Is,exports.Error155501=Bs,exports.Error155502=Rs,exports.Error155503=ks,exports.Error155504=_s,exports.Error155505=Us,exports.Error155506=Ns,exports.Error155507=Ls,exports.Error155508=Ps,exports.Error155509=Os,exports.Error155510=Ds,exports.Error155511=Fs,exports.Error155512=qs,exports.Error155514=Vs,exports.Error155515=Ms,exports.Error155516=js,exports.Error155517=Ks,exports.Error155601=zs,exports.Error155701=Hs,exports.Error155702=$s,exports.Error155703=Gs,exports.Error155704=Ws,exports.Error155705=Xs,exports.Error155706=Qs,exports.Error155707=Ys,exports.Error155708=Js,exports.Error155709=Zs,exports.Error155710=ei,exports.Error155711=ti,exports.Error155712=ri,exports.Error155713=ai,exports.Error155714=ni,exports.Error155715=si,exports.Error155716=ii,exports.Error155717=oi,exports.Error155718=ci,exports.Error155719=li,exports.Error155720=ui,exports.Error155721=pi,exports.Error155801=di,exports.Error155802=fi,exports.Error155803=hi,exports.Error155804=mi,exports.Error155805=vi,exports.Error155806=gi,exports.Error155807=xi,exports.Error155808=yi,exports.Error156001=bi,exports.Error156002=Ei,exports.Error156003=Ci,exports.Error156004=Ti,exports.Error156005=Si,exports.Error156006=wi,exports.Error156007=Ai,exports.Error156008=Ii,exports.Error156009=Bi,exports.Error156010=Ri,exports.Error156011=ki,exports.Error156012=_i,exports.Error156013=Ui,exports.Error156014=Ni,exports.Error156015=Li,exports.Error156016=Pi,exports.Error156017=Oi,exports.Error156018=Di,exports.Error156019=Fi,exports.Error156020=qi,exports.Error156021=Vi,exports.Error156023=Mi,exports.Error156024=ji,exports.Error156025=Ki,exports.Error156026=zi,exports.Error156027=Hi,exports.Error156030=$i,exports.Error156031=Gi,exports.Error156032=Wi,exports.Error175001=Xi,exports.Error175002=Qi,exports.Error175003=Yi,exports.Error175004=Ji,exports.Error175005=Zi,exports.Error175006=eo,exports.Error175007=to,exports.Error175008=ro,exports.Error175009=ao,exports.Error175010=no,exports.Error175011=so,exports.Error175012=io,exports.Error175013=oo,exports.Error175201=co,exports.Error175202=lo,exports.Error175203=uo,exports.Error175204=po,exports.Error175205=fo,exports.Error175301=ho,exports.Error175302=mo,exports.Error175303=vo,exports.Error175401=go,exports.Error175402=xo,exports.Error175403=yo,exports.Error175404=bo,exports.Error175405=Eo,exports.Error175406=Co,exports.Error175407=To,exports.Error175408=So,exports.Error175409=wo,exports.Error175410=Ao,exports.Error177001=Io,exports.Error177002=Bo,exports.Error177003=Ro,exports.Error177004=ko,exports.Error177005=_o,exports.Error177006=Uo,exports.Error177007=No,exports.Error177008=Lo,exports.Error177009=Po,exports.Error177010=Oo,exports.Error177011=Do,exports.Error177012=Fo,exports.Error177013=qo,exports.Error177014=Vo,exports.Error177015=Mo,exports.Error177016=jo,exports.Error177017=Ko,exports.Error177018=zo,exports.Error177019=Ho,exports.Error177020=$o,exports.Error177021=Go,exports.Error177022=Wo,exports.Error177023=Xo,exports.Error177024=Qo,exports.Error177025=Yo,exports.Error177026=Jo,exports.Error177301=Zo,exports.Error177302=ec,exports.Error177303=tc,exports.Error177304=rc,exports.Error177305=ac,exports.Error177601=nc,exports.Error177602=sc,exports.Error177603=ic,exports.Error177604=oc,exports.Error177605=cc,exports.Error177606=lc,exports.Error177607=uc,exports.Error177901=pc,exports.ForbiddenError=Ca,exports.GatewayTimeoutError=Ra,exports.HostUnreachableError=Da,exports.HttpError=ya,exports.HttpRequestError=Lt,exports.HttpResponseError=C,exports.InternalServerError=wa,exports.NetworkUnreachableError=Pa,exports.NotFoundError=Ta,exports.NotImplementedError=Aa,exports.RatelimitError=Sa,exports.ServiceUnavailableError=Ba,exports.UnauthorizedError=Ea,exports.defaultBaseUrl=yp,exports.fromAxiosError=te,exports.initiateUserControlledWalletsClient=B2;
|
|
46
|
+
`,i},Cl.publicKeyToOpenSSH=function(e,t){var a="ssh-rsa";t=t||"";var r=et.util.createBuffer();return na(r,a),Jt(r,e.e),Jt(r,e.n),a+" "+et.util.encode64(r.bytes())+" "+t},Cl.privateKeyToOpenSSH=function(e,t){return t?et.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):et.pki.privateKeyToPem(e)},Cl.getPublicKeyFingerprint=function(e,t){t=t||{};var a=t.md||et.md.md5.create(),r="ssh-rsa",n=et.util.createBuffer();na(n,r),Jt(n,e.e),Jt(n,e.n),a.start(),a.update(n.getBytes());var i=a.digest();if(t.encoding==="hex"){var s=i.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i};function Jt(e,t){var a=t.toString(16);a[0]>="8"&&(a="00"+a);var r=et.util.hexToBytes(a);e.putInt32(r.length),e.putBytes(r)}function na(e,t){e.putInt32(t.length),e.putString(t)}function Tl(){for(var e=et.md.sha1.create(),t=arguments.length,a=0;a<t;++a)e.update(arguments[a]);return e.digest()}const Ut=()=>Or.randomUUID(),KT=({configurationsClient:e})=>async t=>{try{return await e.Faucet.requestTestnetTokens(void 0,t)}catch(a){throw re(a)?te(a):a}};var ah="10.5.1";const nh=({client:e})=>async({xRequestId:t,...a})=>{try{return ae(await e.PINAuthentication.getUserToken({...a},t))}catch(r){throw re(r)?te(r):r}},We=async(e,t,a=!1)=>{let r;return e.storage&&(r=await e.storage.get("userToken:"+t)),!a&&r?.userToken!=null&&r.expirationTime>Date.now()?r.userToken:await zT(e,t)};async function zT(e,t){const a=await nh(e)({userId:t});if(!a.data?.userToken)throw new Error("Could not fetch user token");return e.storage&&await e.storage.set("userToken:"+t,{...a.data,expirationTime:Date.now()+3e3*1e3}),a.data.userToken}const HT=e=>async({userToken:t,userId:a,idempotencyKey:r,xRequestId:n})=>{try{return ae(await e.client.PINAuthentication.createUserPinChallenge(t??await We(e,a),{idempotencyKey:r??Ut()},n))}catch(i){throw re(i)?te(i):i}},$T=e=>async({userToken:t,userId:a,idempotencyKey:r,accountType:n="EOA",xRequestId:i,...s})=>{try{return ae(await e.client.Users.createUserWithPinChallenge(t??await We(e,a),{idempotencyKey:r??Ut(),accountType:n,...s},i))}catch(o){throw re(o)?te(o):o}},GT=e=>async({userToken:t,userId:a,idempotencyKey:r,xRequestId:n})=>{try{return ae(await e.client.PINAuthentication.createUserPinRestoreChallenge(t??await We(e,a),{idempotencyKey:r??Ut()},n))}catch(i){throw re(i)?te(i):i}},WT=e=>async({userToken:t,userId:a,idempotencyKey:r})=>{try{return ae(await e.client.PINAuthentication.updateUserPinChallenge(t??await We(e,a),{idempotencyKey:r??Ut()}))}catch(n){throw re(n)?te(n):n}},XT=e=>async({userToken:t,userId:a,xRequestId:r,...n})=>{try{return ae(await e.client.Signing.signUserMessage(t??await We(e,a),n,r))}catch(i){throw re(i)?te(i):i}},QT=e=>async({userToken:t,userId:a,xRequestId:r,...n})=>{try{return ae(await e.client.Signing.signUserTransaction(t??await We(e,a),{...n},r))}catch(i){throw re(i)?te(i):i}},YT=e=>async({userToken:t,userId:a,xRequestId:r,...n})=>{try{return ae(await e.client.Signing.signUserTypedData(t??await We(e,a),n,r))}catch(i){throw re(i)?te(i):i}},JT=({client:e})=>async({id:t})=>{try{return ae(await e.TokenLookup.getTokenId(t))}catch(a){throw re(a)?te(a):a}},ZT=e=>async({userToken:t,userId:a,id:r,idempotencyKey:n,xRequestId:i})=>{try{return ae(await e.client.Transactions.createUserTransactionAccelerateChallenge(t??await We(e,a),r,{idempotencyKey:n??Ut()},i))}catch(s){throw re(s)?te(s):s}},e2=e=>async({userToken:t,userId:a,id:r,idempotencyKey:n,xRequestId:i})=>{try{return ae(await e.client.Transactions.createUserTransactionCancelChallenge(t??await We(e,a),r,{idempotencyKey:n??Ut()},i))}catch(s){throw re(s)?te(s):s}},t2=e=>async({userToken:t,userId:a,idempotencyKey:r,fee:n,xRequestId:i,...s})=>{try{return ae(await e.client.Transactions.createUserTransactionTransferChallenge(t??await We(e,a),{idempotencyKey:r??Ut(),...n.config,...s},i))}catch(o){throw re(o)?te(o):o}},r2=e=>async({userToken:t,userId:a,idempotencyKey:r,fee:n,xRequestId:i,...s})=>{try{return ae(await e.client.Transactions.createUserTransactionContractExecutionChallenge(t??await We(e,a),{idempotencyKey:r??Ut(),...n.config,...s},i))}catch(o){throw re(o)?te(o):o}},a2=e=>async({userId:t,userToken:a,source:r,xRequestId:n,...i})=>{try{return ae(await e.client.Transactions.createTransactionEstimateFee(a??await We(e,t),{...i,...r},n))}catch(s){throw re(s)?te(s):s}},n2=e=>async({userToken:t,userId:a,amount:r,xRequestId:n,...i})=>{try{return ae(await e.client.Transactions.createTransferEstimateFee(t??await We(e,a),{amounts:r,...i},n))}catch(s){throw re(s)?te(s):s}},s2=e=>async({id:t,userToken:a,userId:r,txType:n,xRequestId:i})=>{try{return ae(await e.client.Transactions.getTransaction(t,a??await We(e,r),n,i))}catch(s){throw re(s)?te(s):s}},i2=({client:e})=>async({blockchain:t,address:a,walletId:r,xRequestId:n}={})=>{try{return ae(await e.Transactions.getLowestNonceTransaction(t,a,r,{headers:n?{"X-Request-Id":n}:void 0}))}catch(i){throw re(i)?te(i):i}},o2=e=>async({userToken:t,blockchain:a,destinationAddress:r,includeAll:n,operation:i,state:s,txHash:o,txType:c,userId:l,walletIds:u,from:p,pageAfter:d,pageBefore:g,pageSize:h,to:y,order:b,xRequestId:E})=>{try{return ae(await e.client.Transactions.listTransactions(t??await We(e,l),a,r,n,i,s,o,c,l,u?.join(","),p,y,g,d,h,b,E))}catch(I){throw re(I)?te(I):I}},c2=({client:e})=>async t=>{try{return ae(await e.Transactions.createValidateAddress(t))}catch(a){throw re(a)?te(a):a}},l2=({client:e})=>async({...t})=>{try{return ae(await e.PINAuthentication.createUser({...t}))}catch(a){throw re(a)?te(a):a}},u2=e=>async({userToken:t,idempotencyKey:a,userId:r,xRequestId:n,...i})=>{try{return ae(await e.client.SocialEmailAuthentication.resendOTP(t??await We(e,r),{idempotencyKey:a??Ut(),...i},n))}catch(s){throw re(s)?te(s):s}},p2=({client:e})=>async({idempotencyKey:t,xRequestId:a,...r})=>{try{return ae(await e.SocialEmailAuthentication.createDeviceTokenEmailLogin({idempotencyKey:t??Ut(),...r},a))}catch(n){throw re(n)?te(n):n}},d2=({client:e})=>async({userId:t,xRequestId:a})=>{try{return ae(await e.Users.getUser(t,a))}catch(r){throw re(r)?te(r):r}},f2=({client:e})=>async({userToken:t,xRequestId:a})=>{try{return ae(await e.Users.getUserByToken(t,a))}catch(r){throw re(r)?te(r):r}},h2=({client:e})=>async({userToken:t,challengeId:a,xRequestId:r})=>{try{return ae(await e.Users.getUserChallenge(t,a,r))}catch(n){throw re(n)?te(n):n}},m2=({client:e})=>async({pinStatus:t,securityQuestionStatus:a,from:r,to:n,pageBefore:i,pageAfter:s,pageSize:o,order:c,xRequestId:l}={})=>{try{return ae(await e.Users.listUsers(t,a,r,n,i,s,o,c,l))}catch(u){throw re(u)?te(u):u}},v2=({client:e})=>async({userToken:t,challengeStatus:a,xRequestId:r})=>{try{return ae(await e.Users.listUserChallenges(t,a,r))}catch(n){throw re(n)?te(n):n}},g2=e=>async({userId:t,userToken:a,deviceId:r,idempotencyKey:n,refreshToken:i,xRequestId:s})=>{try{return ae(await e.client.SocialEmailAuthentication.refreshUserToken(a??await We(e,t),{idempotencyKey:n??Ut(),refreshToken:i,deviceId:r},s))}catch(o){throw re(o)?te(o):o}},x2=({client:e})=>async({idempotencyKey:t,xRequestId:a,...r})=>{try{return ae(await e.SocialEmailAuthentication.createDeviceTokenSocialLogin({idempotencyKey:t??Ut(),...r},a))}catch(n){throw re(n)?te(n):n}},y2=e=>async({userToken:t,userId:a,idempotencyKey:r,accountType:n="EOA",xRequestId:i,...s})=>{try{return ae(await e.client.Wallets.createUserWallet(t??await We(e,a),{idempotencyKey:r??Ut(),accountType:n,...s},i))}catch(o){throw re(o)?te(o):o}},b2=e=>async({id:t,userToken:a,userId:r,xRequestId:n})=>{try{return ae(await e.client.Wallets.getWallet(t,a??await We(e,r),n))}catch(i){throw re(i)?te(i):i}},E2=e=>async({walletId:t,userToken:a,userId:r,includeAll:n,name:i,pageAfter:s,pageBefore:o,pageSize:c,tokenAddresses:l,standard:u,xRequestId:p})=>{try{return ae(await e.client.Wallets.listWalletNfts(a??await We(e,r),t,n,i,l?.join(","),u,o,s,c,p))}catch(d){throw re(d)?te(d):d}},C2=e=>async({walletId:t,userToken:a,userId:r,includeAll:n,name:i,pageAfter:s,pageBefore:o,pageSize:c,tokenAddresses:l,standard:u,xRequestId:p})=>{try{return ae(await e.client.Wallets.listWalletBalance(a??await We(e,r),t,n,i,l?.join(","),u,o,s,c,p))}catch(d){throw re(d)?te(d):d}},T2=e=>async({userId:t,userToken:a,address:r,blockchain:n,from:i,pageAfter:s,pageBefore:o,pageSize:c,to:l,walletSetId:u,refId:p,scaCore:d,order:g,xRequestId:h})=>{try{return ae(await e.client.Wallets.listWallets(a??await We(e,t),r,n,d,u,p,i,l,o,s,c,g,h))}catch(y){throw re(y)?te(y):y}},S2=e=>async({id:t,name:a,refId:r,userToken:n,userId:i})=>{try{return ae(await e.client.Wallets.updateWallet(t,n??await We(e,i),{name:a,refId:r}))}catch(s){throw re(s)?te(s):s}};var w2=Object.defineProperty,A2=(e,t,a)=>t in e?w2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,I2=(e,t,a)=>A2(e,typeof t!="symbol"?t+"":t,a);const yp="https://api.circle.com";class sh{constructor(t){I2(this,"params");const{apiKey:a,baseUrl:r,storage:n,userAgent:i,headers:s}=t;this.params={client:new Vy(r??yp,{apiKey:a,version:ah,userAgent:i},s),configurationsClient:new py(r??yp,{apiKey:a,version:ah,userAgent:i},s),storage:n??new eb}}createUserPin(t){return HT(this.params)(t)}createUserPinWithWallets(t){return $T(this.params)(t)}updateUserPin(t){return WT(this.params)(t)}restoreUserPin(t){return GT(this.params)(t)}createDeviceTokenForEmailLogin(t){return p2(this.params)(t)}createDeviceTokenForSocialLogin(t){return x2(this.params)(t)}refreshUserToken(t){return g2(this.params)(t)}resendOTP(t){return u2(this.params)(t)}createWallet(t){return y2(this.params)(t)}listWallets(t){return T2(this.params)(t)}getWallet(t){return b2(this.params)(t)}updateWallet(t){return S2(this.params)(t)}getWalletTokenBalance(t){return C2(this.params)(t)}getWalletNFTBalance(t){return E2(this.params)(t)}accelerateTransaction(t){return ZT(this.params)(t)}createTransaction(t){return t2(this.params)(t)}cancelTransaction(t){return e2(this.params)(t)}getTransaction(t){return s2(this.params)(t)}listTransactions(t){return o2(this.params)(t)}estimateContractExecutionFee(t){return a2(this.params)(t)}createUserTransactionContractExecutionChallenge(t){return r2(this.params)(t)}estimateTransferFee(t){return n2(this.params)(t)}validateAddress(t){return c2(this.params)(t)}getLowestNonceTransaction(t){return i2(this.params)(t)}createUser(t){return l2(this.params)(t)}getUser(t){return d2(this.params)(t)}getUserStatus(t){return f2(this.params)(t)}listUsers(t){return m2(this.params)(t)}createUserToken(t){return nh(this.params)(t)}getUserChallenge(t){return h2(this.params)(t)}listUserChallenges(t){return v2(this.params)(t)}getToken(t){return JT(this.params)(t)}signMessage(t){return XT(this.params)(t)}signTransaction(t){return QT(this.params)(t)}signTypedData(t){return YT(this.params)(t)}requestTestnetTokens(t){return KT(this.params)(t)}createMonitoredTokens(t){return V1(this.params)(t)}updateMonitoredTokens(t){return K1(this.params)(t)}listMonitoredTokens(t){return j1(this.params)(t)}deleteMonitoredTokens(t){return M1(this.params)(t)}updateMonitoredTokensScope(t){return z1(this.params)(t)}createSubscription(t){return H1(this.params)(t)}deleteSubscription(t){return $1(this.params)(t)}getSubscription(t){return G1(this.params)(t)}getNotificationSignature(t){return W1(this.params)(t)}listSubscriptions(){return X1(this.params)()}updateSubscription(t){return Q1(this.params)(t)}}function B2(e){return new sh(e)}exports.BadGatewayError=Ia,exports.BadRequestError=ba,exports.Blockchain=Dy,exports.CircleUserControlledWalletsClient=sh,exports.ConnectionAbortedError=Ua,exports.ConnectionRefusedError=ka,exports.ConnectionResetError=Oa,exports.ConnectionTimeoutError=_a,exports.DNSNotFoundError=Na,exports.DNSTimeoutError=La,exports.Error110700=Ru,exports.Error110701=ku,exports.Error110702=_u,exports.Error110703=Uu,exports.Error155101=Fa,exports.Error155102=qa,exports.Error155103=Va,exports.Error155104=Ma,exports.Error155105=ja,exports.Error155106=Ka,exports.Error155107=za,exports.Error155108=Ha,exports.Error155109=$a,exports.Error155110=Ga,exports.Error155111=Wa,exports.Error155112=Xa,exports.Error155113=Qa,exports.Error155114=Ya,exports.Error155115=Ja,exports.Error155116=Za,exports.Error155117=en,exports.Error155118=tn,exports.Error155119=rn,exports.Error155120=an,exports.Error155121=nn,exports.Error155122=sn,exports.Error155123=on,exports.Error155124=cn,exports.Error155130=ln,exports.Error155131=un,exports.Error155132=pn,exports.Error155133=dn,exports.Error155134=fn,exports.Error155135=hn,exports.Error155136=mn,exports.Error155137=vn,exports.Error155138=gn,exports.Error155139=xn,exports.Error155140=yn,exports.Error155141=bn,exports.Error155142=En,exports.Error155143=Cn,exports.Error155144=Tn,exports.Error155145=Sn,exports.Error155146=wn,exports.Error155150=An,exports.Error155151=In,exports.Error155152=Bn,exports.Error155154=Rn,exports.Error155155=kn,exports.Error155156=_n,exports.Error155157=Un,exports.Error155158=Nn,exports.Error155159=Ln,exports.Error155160=Pn,exports.Error155201=On,exports.Error155202=Dn,exports.Error155203=Fn,exports.Error155204=qn,exports.Error155205=Vn,exports.Error155206=Mn,exports.Error155207=jn,exports.Error155208=Kn,exports.Error155209=zn,exports.Error155210=Hn,exports.Error155211=$n,exports.Error155215=Gn,exports.Error155218=Wn,exports.Error155219=Xn,exports.Error155220=Qn,exports.Error155221=Yn,exports.Error155222=Jn,exports.Error155223=Zn,exports.Error155224=es,exports.Error155225=ts,exports.Error155226=rs,exports.Error155227=as,exports.Error155228=ns,exports.Error155229=ss,exports.Error155230=is,exports.Error155231=os,exports.Error155232=cs,exports.Error155233=ls,exports.Error155234=us,exports.Error155235=ps,exports.Error155236=ds,exports.Error155237=fs,exports.Error155238=hs,exports.Error155239=ms,exports.Error155240=vs,exports.Error155241=gs,exports.Error155242=xs,exports.Error155243=ys,exports.Error155244=bs,exports.Error155245=Es,exports.Error155247=Cs,exports.Error155254=Ts,exports.Error155257=Ss,exports.Error155258=ws,exports.Error155262=As,exports.Error155264=Is,exports.Error155501=Bs,exports.Error155502=Rs,exports.Error155503=ks,exports.Error155504=_s,exports.Error155505=Us,exports.Error155506=Ns,exports.Error155507=Ls,exports.Error155508=Ps,exports.Error155509=Os,exports.Error155510=Ds,exports.Error155511=Fs,exports.Error155512=qs,exports.Error155514=Vs,exports.Error155515=Ms,exports.Error155516=js,exports.Error155517=Ks,exports.Error155601=zs,exports.Error155701=Hs,exports.Error155702=$s,exports.Error155703=Gs,exports.Error155704=Ws,exports.Error155705=Xs,exports.Error155706=Qs,exports.Error155707=Ys,exports.Error155708=Js,exports.Error155709=Zs,exports.Error155710=ei,exports.Error155711=ti,exports.Error155712=ri,exports.Error155713=ai,exports.Error155714=ni,exports.Error155715=si,exports.Error155716=ii,exports.Error155717=oi,exports.Error155718=ci,exports.Error155719=li,exports.Error155720=ui,exports.Error155721=pi,exports.Error155801=di,exports.Error155802=fi,exports.Error155803=hi,exports.Error155804=mi,exports.Error155805=vi,exports.Error155806=gi,exports.Error155807=xi,exports.Error155808=yi,exports.Error156001=bi,exports.Error156002=Ei,exports.Error156003=Ci,exports.Error156004=Ti,exports.Error156005=Si,exports.Error156006=wi,exports.Error156007=Ai,exports.Error156008=Ii,exports.Error156009=Bi,exports.Error156010=Ri,exports.Error156011=ki,exports.Error156012=_i,exports.Error156013=Ui,exports.Error156014=Ni,exports.Error156015=Li,exports.Error156016=Pi,exports.Error156017=Oi,exports.Error156018=Di,exports.Error156019=Fi,exports.Error156020=qi,exports.Error156021=Vi,exports.Error156023=Mi,exports.Error156024=ji,exports.Error156025=Ki,exports.Error156026=zi,exports.Error156027=Hi,exports.Error156030=$i,exports.Error156031=Gi,exports.Error156032=Wi,exports.Error175001=Xi,exports.Error175002=Qi,exports.Error175003=Yi,exports.Error175004=Ji,exports.Error175005=Zi,exports.Error175006=eo,exports.Error175007=to,exports.Error175008=ro,exports.Error175009=ao,exports.Error175010=no,exports.Error175011=so,exports.Error175012=io,exports.Error175013=oo,exports.Error175201=co,exports.Error175202=lo,exports.Error175203=uo,exports.Error175204=po,exports.Error175205=fo,exports.Error175301=ho,exports.Error175302=mo,exports.Error175303=vo,exports.Error175401=go,exports.Error175402=xo,exports.Error175403=yo,exports.Error175404=bo,exports.Error175405=Eo,exports.Error175406=Co,exports.Error175407=To,exports.Error175408=So,exports.Error175409=wo,exports.Error175410=Ao,exports.Error177001=Io,exports.Error177002=Bo,exports.Error177003=Ro,exports.Error177004=ko,exports.Error177005=_o,exports.Error177006=Uo,exports.Error177007=No,exports.Error177008=Lo,exports.Error177009=Po,exports.Error177010=Oo,exports.Error177011=Do,exports.Error177012=Fo,exports.Error177013=qo,exports.Error177014=Vo,exports.Error177015=Mo,exports.Error177016=jo,exports.Error177017=Ko,exports.Error177018=zo,exports.Error177019=Ho,exports.Error177020=$o,exports.Error177021=Go,exports.Error177022=Wo,exports.Error177023=Xo,exports.Error177024=Qo,exports.Error177025=Yo,exports.Error177026=Jo,exports.Error177301=Zo,exports.Error177302=ec,exports.Error177303=tc,exports.Error177304=rc,exports.Error177305=ac,exports.Error177601=nc,exports.Error177602=sc,exports.Error177603=ic,exports.Error177604=oc,exports.Error177605=cc,exports.Error177606=lc,exports.Error177607=uc,exports.Error177901=pc,exports.ForbiddenError=Ca,exports.GatewayTimeoutError=Ra,exports.HostUnreachableError=Da,exports.HttpError=ya,exports.HttpRequestError=Lt,exports.HttpResponseError=C,exports.InternalServerError=wa,exports.NetworkUnreachableError=Pa,exports.NotFoundError=Ta,exports.NotImplementedError=Aa,exports.RatelimitError=Sa,exports.ServiceUnavailableError=Ba,exports.UnauthorizedError=Ea,exports.defaultBaseUrl=yp,exports.fromAxiosError=te,exports.initiateUserControlledWalletsClient=B2;
|
|
@@ -43,4 +43,4 @@ import ga from"util";import ct,{Readable as lh}from"stream";import bp,{resolve a
|
|
|
43
43
|
Private-Lines: `+c+`\r
|
|
44
44
|
`,i+=u;var b=Cl("putty-private-key-file-mac-key",t),E=et.util.createBuffer();rr(E,a),rr(E,n),rr(E,r),E.putInt32(s.length()),E.putBuffer(s),E.putInt32(l.length()),E.putBuffer(l);var I=et.hmac.create();return I.start("sha1",b),I.update(E.bytes()),i+=`\r
|
|
45
45
|
Private-MAC: `+I.digest().toHex()+`\r
|
|
46
|
-
`,i},El.publicKeyToOpenSSH=function(e,t){var r="ssh-rsa";t=t||"";var a=et.util.createBuffer();return rr(a,r),Jt(a,e.e),Jt(a,e.n),r+" "+et.util.encode64(a.bytes())+" "+t},El.privateKeyToOpenSSH=function(e,t){return t?et.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):et.pki.privateKeyToPem(e)},El.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||et.md.md5.create(),a="ssh-rsa",n=et.util.createBuffer();rr(n,a),Jt(n,e.e),Jt(n,e.n),r.start(),r.update(n.getBytes());var i=r.digest();if(t.encoding==="hex"){var s=i.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i};function Jt(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var a=et.util.hexToBytes(r);e.putInt32(a.length),e.putBytes(a)}function rr(e,t){e.putInt32(t.length),e.putString(t)}function Cl(){for(var e=et.md.sha1.create(),t=arguments.length,r=0;r<t;++r)e.update(arguments[r]);return e.digest()}const Ut=()=>ph(),$T=({configurationsClient:e})=>async t=>{try{return await e.Faucet.requestTestnetTokens(void 0,t)}catch(r){throw ae(r)?te(r):r}};var nh="10.4.0";const sh=({client:e})=>async({xRequestId:t,...r})=>{try{return re(await e.PINAuthentication.getUserToken({...r},t))}catch(a){throw ae(a)?te(a):a}},We=async(e,t,r=!1)=>{let a;return e.storage&&(a=await e.storage.get("userToken:"+t)),!r&&a?.userToken!=null&&a.expirationTime>Date.now()?a.userToken:await GT(e,t)};async function GT(e,t){const r=await sh(e)({userId:t});if(!r.data?.userToken)throw new Error("Could not fetch user token");return e.storage&&await e.storage.set("userToken:"+t,{...r.data,expirationTime:Date.now()+3e3*1e3}),r.data.userToken}const WT=e=>async({userToken:t,userId:r,idempotencyKey:a,xRequestId:n})=>{try{return re(await e.client.PINAuthentication.createUserPinChallenge(t??await We(e,r),{idempotencyKey:a??Ut()},n))}catch(i){throw ae(i)?te(i):i}},XT=e=>async({userToken:t,userId:r,idempotencyKey:a,accountType:n="EOA",xRequestId:i,...s})=>{try{return re(await e.client.Users.createUserWithPinChallenge(t??await We(e,r),{idempotencyKey:a??Ut(),accountType:n,...s},i))}catch(o){throw ae(o)?te(o):o}},QT=e=>async({userToken:t,userId:r,idempotencyKey:a,xRequestId:n})=>{try{return re(await e.client.PINAuthentication.createUserPinRestoreChallenge(t??await We(e,r),{idempotencyKey:a??Ut()},n))}catch(i){throw ae(i)?te(i):i}},YT=e=>async({userToken:t,userId:r,idempotencyKey:a})=>{try{return re(await e.client.PINAuthentication.updateUserPinChallenge(t??await We(e,r),{idempotencyKey:a??Ut()}))}catch(n){throw ae(n)?te(n):n}},JT=e=>async({userToken:t,userId:r,xRequestId:a,...n})=>{try{return re(await e.client.Signing.signUserMessage(t??await We(e,r),n,a))}catch(i){throw ae(i)?te(i):i}},ZT=e=>async({userToken:t,userId:r,xRequestId:a,...n})=>{try{return re(await e.client.Signing.signUserTransaction(t??await We(e,r),{...n},a))}catch(i){throw ae(i)?te(i):i}},eS=e=>async({userToken:t,userId:r,xRequestId:a,...n})=>{try{return re(await e.client.Signing.signUserTypedData(t??await We(e,r),n,a))}catch(i){throw ae(i)?te(i):i}},tS=({client:e})=>async({id:t})=>{try{return re(await e.TokenLookup.getTokenId(t))}catch(r){throw ae(r)?te(r):r}},aS=e=>async({userToken:t,userId:r,id:a,idempotencyKey:n,xRequestId:i})=>{try{return re(await e.client.Transactions.createUserTransactionAccelerateChallenge(t??await We(e,r),a,{idempotencyKey:n??Ut()},i))}catch(s){throw ae(s)?te(s):s}},rS=e=>async({userToken:t,userId:r,id:a,idempotencyKey:n,xRequestId:i})=>{try{return re(await e.client.Transactions.createUserTransactionCancelChallenge(t??await We(e,r),a,{idempotencyKey:n??Ut()},i))}catch(s){throw ae(s)?te(s):s}},nS=e=>async({userToken:t,userId:r,idempotencyKey:a,fee:n,xRequestId:i,...s})=>{try{return re(await e.client.Transactions.createUserTransactionTransferChallenge(t??await We(e,r),{idempotencyKey:a??Ut(),...n.config,...s},i))}catch(o){throw ae(o)?te(o):o}},sS=e=>async({userToken:t,userId:r,idempotencyKey:a,fee:n,xRequestId:i,...s})=>{try{return re(await e.client.Transactions.createUserTransactionContractExecutionChallenge(t??await We(e,r),{idempotencyKey:a??Ut(),...n.config,...s},i))}catch(o){throw ae(o)?te(o):o}},iS=e=>async({userId:t,userToken:r,source:a,xRequestId:n,...i})=>{try{return re(await e.client.Transactions.createTransactionEstimateFee(r??await We(e,t),{...i,...a},n))}catch(s){throw ae(s)?te(s):s}},oS=e=>async({userToken:t,userId:r,amount:a,xRequestId:n,...i})=>{try{return re(await e.client.Transactions.createTransferEstimateFee(t??await We(e,r),{amounts:a,...i},n))}catch(s){throw ae(s)?te(s):s}},cS=e=>async({id:t,userToken:r,userId:a,txType:n,xRequestId:i})=>{try{return re(await e.client.Transactions.getTransaction(t,r??await We(e,a),n,i))}catch(s){throw ae(s)?te(s):s}},lS=({client:e})=>async({blockchain:t,address:r,walletId:a,xRequestId:n}={})=>{try{return re(await e.Transactions.getLowestNonceTransaction(t,r,a,{headers:n?{"X-Request-Id":n}:void 0}))}catch(i){throw ae(i)?te(i):i}},uS=e=>async({userToken:t,blockchain:r,destinationAddress:a,includeAll:n,operation:i,state:s,txHash:o,txType:c,userId:l,walletIds:u,from:p,pageAfter:d,pageBefore:g,pageSize:h,to:y,order:b,xRequestId:E})=>{try{return re(await e.client.Transactions.listTransactions(t??await We(e,l),r,a,n,i,s,o,c,l,u?.join(","),p,y,g,d,h,b,E))}catch(I){throw ae(I)?te(I):I}},pS=({client:e})=>async t=>{try{return re(await e.Transactions.createValidateAddress(t))}catch(r){throw ae(r)?te(r):r}},dS=({client:e})=>async({...t})=>{try{return re(await e.PINAuthentication.createUser({...t}))}catch(r){throw ae(r)?te(r):r}},fS=e=>async({userToken:t,idempotencyKey:r,userId:a,xRequestId:n,...i})=>{try{return re(await e.client.SocialEmailAuthentication.resendOTP(t??await We(e,a),{idempotencyKey:r??Ut(),...i},n))}catch(s){throw ae(s)?te(s):s}},hS=({client:e})=>async({idempotencyKey:t,xRequestId:r,...a})=>{try{return re(await e.SocialEmailAuthentication.createDeviceTokenEmailLogin({idempotencyKey:t??Ut(),...a},r))}catch(n){throw ae(n)?te(n):n}},mS=({client:e})=>async({userId:t,xRequestId:r})=>{try{return re(await e.Users.getUser(t,r))}catch(a){throw ae(a)?te(a):a}},vS=({client:e})=>async({userToken:t,xRequestId:r})=>{try{return re(await e.Users.getUserByToken(t,r))}catch(a){throw ae(a)?te(a):a}},gS=({client:e})=>async({userToken:t,challengeId:r,xRequestId:a})=>{try{return re(await e.Users.getUserChallenge(t,r,a))}catch(n){throw ae(n)?te(n):n}},xS=({client:e})=>async({pinStatus:t,securityQuestionStatus:r,from:a,to:n,pageBefore:i,pageAfter:s,pageSize:o,order:c,xRequestId:l}={})=>{try{return re(await e.Users.listUsers(t,r,a,n,i,s,o,c,l))}catch(u){throw ae(u)?te(u):u}},yS=({client:e})=>async({userToken:t,challengeStatus:r,xRequestId:a})=>{try{return re(await e.Users.listUserChallenges(t,r,a))}catch(n){throw ae(n)?te(n):n}},bS=e=>async({userId:t,userToken:r,deviceId:a,idempotencyKey:n,refreshToken:i,xRequestId:s})=>{try{return re(await e.client.SocialEmailAuthentication.refreshUserToken(r??await We(e,t),{idempotencyKey:n??Ut(),refreshToken:i,deviceId:a},s))}catch(o){throw ae(o)?te(o):o}},ES=({client:e})=>async({idempotencyKey:t,xRequestId:r,...a})=>{try{return re(await e.SocialEmailAuthentication.createDeviceTokenSocialLogin({idempotencyKey:t??Ut(),...a},r))}catch(n){throw ae(n)?te(n):n}},CS=e=>async({userToken:t,userId:r,idempotencyKey:a,accountType:n="EOA",xRequestId:i,...s})=>{try{return re(await e.client.Wallets.createUserWallet(t??await We(e,r),{idempotencyKey:a??Ut(),accountType:n,...s},i))}catch(o){throw ae(o)?te(o):o}},TS=e=>async({id:t,userToken:r,userId:a,xRequestId:n})=>{try{return re(await e.client.Wallets.getWallet(t,r??await We(e,a),n))}catch(i){throw ae(i)?te(i):i}},SS=e=>async({walletId:t,userToken:r,userId:a,includeAll:n,name:i,pageAfter:s,pageBefore:o,pageSize:c,tokenAddresses:l,standard:u,xRequestId:p})=>{try{return re(await e.client.Wallets.listWalletNfts(r??await We(e,a),t,n,i,l?.join(","),u,o,s,c,p))}catch(d){throw ae(d)?te(d):d}},wS=e=>async({walletId:t,userToken:r,userId:a,includeAll:n,name:i,pageAfter:s,pageBefore:o,pageSize:c,tokenAddresses:l,standard:u,xRequestId:p})=>{try{return re(await e.client.Wallets.listWalletBalance(r??await We(e,a),t,n,i,l?.join(","),u,o,s,c,p))}catch(d){throw ae(d)?te(d):d}},AS=e=>async({userId:t,userToken:r,address:a,blockchain:n,from:i,pageAfter:s,pageBefore:o,pageSize:c,to:l,walletSetId:u,refId:p,scaCore:d,order:g,xRequestId:h})=>{try{return re(await e.client.Wallets.listWallets(r??await We(e,t),a,n,d,u,p,i,l,o,s,c,g,h))}catch(y){throw ae(y)?te(y):y}},IS=e=>async({id:t,name:r,refId:a,userToken:n,userId:i})=>{try{return re(await e.client.Wallets.updateWallet(t,n??await We(e,i),{name:r,refId:a}))}catch(s){throw ae(s)?te(s):s}};var BS=Object.defineProperty,RS=(e,t,r)=>t in e?BS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kS=(e,t,r)=>RS(e,typeof t!="symbol"?t+"":t,r);const xp="https://api.circle.com";class ih{constructor(t){kS(this,"params");const{apiKey:r,baseUrl:a,storage:n,userAgent:i,headers:s}=t;this.params={client:new Ky(a??xp,{apiKey:r,version:nh,userAgent:i},s),configurationsClient:new hy(a??xp,{apiKey:r,version:nh,userAgent:i},s),storage:n??new rb}}createUserPin(t){return WT(this.params)(t)}createUserPinWithWallets(t){return XT(this.params)(t)}updateUserPin(t){return YT(this.params)(t)}restoreUserPin(t){return QT(this.params)(t)}createDeviceTokenForEmailLogin(t){return hS(this.params)(t)}createDeviceTokenForSocialLogin(t){return ES(this.params)(t)}refreshUserToken(t){return bS(this.params)(t)}resendOTP(t){return fS(this.params)(t)}createWallet(t){return CS(this.params)(t)}listWallets(t){return AS(this.params)(t)}getWallet(t){return TS(this.params)(t)}updateWallet(t){return IS(this.params)(t)}getWalletTokenBalance(t){return wS(this.params)(t)}getWalletNFTBalance(t){return SS(this.params)(t)}accelerateTransaction(t){return aS(this.params)(t)}createTransaction(t){return nS(this.params)(t)}cancelTransaction(t){return rS(this.params)(t)}getTransaction(t){return cS(this.params)(t)}listTransactions(t){return uS(this.params)(t)}estimateContractExecutionFee(t){return iS(this.params)(t)}createUserTransactionContractExecutionChallenge(t){return sS(this.params)(t)}estimateTransferFee(t){return oS(this.params)(t)}validateAddress(t){return pS(this.params)(t)}getLowestNonceTransaction(t){return lS(this.params)(t)}createUser(t){return dS(this.params)(t)}getUser(t){return mS(this.params)(t)}getUserStatus(t){return vS(this.params)(t)}listUsers(t){return xS(this.params)(t)}createUserToken(t){return sh(this.params)(t)}getUserChallenge(t){return gS(this.params)(t)}listUserChallenges(t){return yS(this.params)(t)}getToken(t){return tS(this.params)(t)}signMessage(t){return JT(this.params)(t)}signTransaction(t){return ZT(this.params)(t)}signTypedData(t){return eS(this.params)(t)}requestTestnetTokens(t){return $T(this.params)(t)}createMonitoredTokens(t){return K1(this.params)(t)}updateMonitoredTokens(t){return $1(this.params)(t)}listMonitoredTokens(t){return H1(this.params)(t)}deleteMonitoredTokens(t){return z1(this.params)(t)}updateMonitoredTokensScope(t){return G1(this.params)(t)}createSubscription(t){return W1(this.params)(t)}deleteSubscription(t){return X1(this.params)(t)}getSubscription(t){return Q1(this.params)(t)}getNotificationSignature(t){return Y1(this.params)(t)}listSubscriptions(){return J1(this.params)()}updateSubscription(t){return Z1(this.params)(t)}}function _S(e){return new ih(e)}export{Ir as BadGatewayError,br as BadRequestError,qy as Blockchain,ih as CircleUserControlledWalletsClient,Ur as ConnectionAbortedError,kr as ConnectionRefusedError,Or as ConnectionResetError,_r as ConnectionTimeoutError,Nr as DNSNotFoundError,Lr as DNSTimeoutError,Bu as Error110700,Ru as Error110701,ku as Error110702,_u as Error110703,Fr as Error155101,Vr as Error155102,qr as Error155103,Mr as Error155104,jr as Error155105,Kr as Error155106,zr as Error155107,Hr as Error155108,$r as Error155109,Gr as Error155110,Wr as Error155111,Xr as Error155112,Qr as Error155113,Yr as Error155114,Jr as Error155115,Zr as Error155116,en as Error155117,tn as Error155118,an as Error155119,rn as Error155120,nn as Error155121,sn as Error155122,on as Error155123,cn as Error155124,ln as Error155130,un as Error155131,pn as Error155132,dn as Error155133,fn as Error155134,hn as Error155135,mn as Error155136,vn as Error155137,gn as Error155138,xn as Error155139,yn as Error155140,bn as Error155141,En as Error155142,Cn as Error155143,Tn as Error155144,Sn as Error155145,wn as Error155146,An as Error155150,In as Error155151,Bn as Error155152,Rn as Error155154,kn as Error155155,_n as Error155156,Un as Error155157,Nn as Error155158,Ln as Error155159,Pn as Error155160,On as Error155201,Dn as Error155202,Fn as Error155203,Vn as Error155204,qn as Error155205,Mn as Error155206,jn as Error155207,Kn as Error155208,zn as Error155209,Hn as Error155210,$n as Error155211,Gn as Error155215,Wn as Error155218,Xn as Error155219,Qn as Error155220,Yn as Error155221,Jn as Error155222,Zn as Error155223,es as Error155224,ts as Error155225,as as Error155226,rs as Error155227,ns as Error155228,ss as Error155229,is as Error155230,os as Error155231,cs as Error155232,ls as Error155233,us as Error155234,ps as Error155235,ds as Error155236,fs as Error155237,hs as Error155238,ms as Error155239,vs as Error155240,gs as Error155241,xs as Error155242,ys as Error155243,bs as Error155244,Es as Error155245,Cs as Error155247,Ts as Error155254,Ss as Error155257,ws as Error155258,As as Error155262,Is as Error155264,Bs as Error155501,Rs as Error155502,ks as Error155503,_s as Error155504,Us as Error155505,Ns as Error155506,Ls as Error155507,Ps as Error155508,Os as Error155509,Ds as Error155510,Fs as Error155511,Vs as Error155512,qs as Error155514,Ms as Error155515,js as Error155516,Ks as Error155517,zs as Error155601,Hs as Error155701,$s as Error155702,Gs as Error155703,Ws as Error155704,Xs as Error155705,Qs as Error155706,Ys as Error155707,Js as Error155708,Zs as Error155709,ei as Error155710,ti as Error155711,ai as Error155712,ri as Error155713,ni as Error155714,si as Error155715,ii as Error155716,oi as Error155717,ci as Error155718,li as Error155719,ui as Error155720,pi as Error155721,di as Error155801,fi as Error155802,hi as Error155803,mi as Error155804,vi as Error155805,gi as Error155806,xi as Error155807,yi as Error155808,bi as Error156001,Ei as Error156002,Ci as Error156003,Ti as Error156004,Si as Error156005,wi as Error156006,Ai as Error156007,Ii as Error156008,Bi as Error156009,Ri as Error156010,ki as Error156011,_i as Error156012,Ui as Error156013,Ni as Error156014,Li as Error156015,Pi as Error156016,Oi as Error156017,Di as Error156018,Fi as Error156019,Vi as Error156020,qi as Error156021,Mi as Error156023,ji as Error156024,Ki as Error156025,zi as Error156026,Hi as Error156027,$i as Error156030,Gi as Error156031,Wi as Error156032,Xi as Error175001,Qi as Error175002,Yi as Error175003,Ji as Error175004,Zi as Error175005,eo as Error175006,to as Error175007,ao as Error175008,ro as Error175009,no as Error175010,so as Error175011,io as Error175012,oo as Error175013,co as Error175201,lo as Error175202,uo as Error175203,po as Error175204,fo as Error175205,ho as Error175301,mo as Error175302,vo as Error175303,go as Error175401,xo as Error175402,yo as Error175403,bo as Error175404,Eo as Error175405,Co as Error175406,To as Error175407,So as Error175408,wo as Error175409,Ao as Error175410,Io as Error177001,Bo as Error177002,Ro as Error177003,ko as Error177004,_o as Error177005,Uo as Error177006,No as Error177007,Lo as Error177008,Po as Error177009,Oo as Error177010,Do as Error177011,Fo as Error177012,Vo as Error177013,qo as Error177014,Mo as Error177015,jo as Error177016,Ko as Error177017,zo as Error177018,Ho as Error177019,$o as Error177020,Go as Error177021,Wo as Error177022,Xo as Error177023,Qo as Error177024,Yo as Error177025,Jo as Error177026,Zo as Error177301,ec as Error177302,tc as Error177303,ac as Error177304,rc as Error177305,nc as Error177601,sc as Error177602,ic as Error177603,oc as Error177604,cc as Error177605,lc as Error177606,uc as Error177607,pc as Error177901,Cr as ForbiddenError,Rr as GatewayTimeoutError,Dr as HostUnreachableError,yr as HttpError,Lt as HttpRequestError,C as HttpResponseError,wr as InternalServerError,Pr as NetworkUnreachableError,Tr as NotFoundError,Ar as NotImplementedError,Sr as RatelimitError,Br as ServiceUnavailableError,Er as UnauthorizedError,xp as defaultBaseUrl,te as fromAxiosError,_S as initiateUserControlledWalletsClient};
|
|
46
|
+
`,i},El.publicKeyToOpenSSH=function(e,t){var r="ssh-rsa";t=t||"";var a=et.util.createBuffer();return rr(a,r),Jt(a,e.e),Jt(a,e.n),r+" "+et.util.encode64(a.bytes())+" "+t},El.privateKeyToOpenSSH=function(e,t){return t?et.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):et.pki.privateKeyToPem(e)},El.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||et.md.md5.create(),a="ssh-rsa",n=et.util.createBuffer();rr(n,a),Jt(n,e.e),Jt(n,e.n),r.start(),r.update(n.getBytes());var i=r.digest();if(t.encoding==="hex"){var s=i.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i};function Jt(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var a=et.util.hexToBytes(r);e.putInt32(a.length),e.putBytes(a)}function rr(e,t){e.putInt32(t.length),e.putString(t)}function Cl(){for(var e=et.md.sha1.create(),t=arguments.length,r=0;r<t;++r)e.update(arguments[r]);return e.digest()}const Ut=()=>ph(),$T=({configurationsClient:e})=>async t=>{try{return await e.Faucet.requestTestnetTokens(void 0,t)}catch(r){throw ae(r)?te(r):r}};var nh="10.5.1";const sh=({client:e})=>async({xRequestId:t,...r})=>{try{return re(await e.PINAuthentication.getUserToken({...r},t))}catch(a){throw ae(a)?te(a):a}},We=async(e,t,r=!1)=>{let a;return e.storage&&(a=await e.storage.get("userToken:"+t)),!r&&a?.userToken!=null&&a.expirationTime>Date.now()?a.userToken:await GT(e,t)};async function GT(e,t){const r=await sh(e)({userId:t});if(!r.data?.userToken)throw new Error("Could not fetch user token");return e.storage&&await e.storage.set("userToken:"+t,{...r.data,expirationTime:Date.now()+3e3*1e3}),r.data.userToken}const WT=e=>async({userToken:t,userId:r,idempotencyKey:a,xRequestId:n})=>{try{return re(await e.client.PINAuthentication.createUserPinChallenge(t??await We(e,r),{idempotencyKey:a??Ut()},n))}catch(i){throw ae(i)?te(i):i}},XT=e=>async({userToken:t,userId:r,idempotencyKey:a,accountType:n="EOA",xRequestId:i,...s})=>{try{return re(await e.client.Users.createUserWithPinChallenge(t??await We(e,r),{idempotencyKey:a??Ut(),accountType:n,...s},i))}catch(o){throw ae(o)?te(o):o}},QT=e=>async({userToken:t,userId:r,idempotencyKey:a,xRequestId:n})=>{try{return re(await e.client.PINAuthentication.createUserPinRestoreChallenge(t??await We(e,r),{idempotencyKey:a??Ut()},n))}catch(i){throw ae(i)?te(i):i}},YT=e=>async({userToken:t,userId:r,idempotencyKey:a})=>{try{return re(await e.client.PINAuthentication.updateUserPinChallenge(t??await We(e,r),{idempotencyKey:a??Ut()}))}catch(n){throw ae(n)?te(n):n}},JT=e=>async({userToken:t,userId:r,xRequestId:a,...n})=>{try{return re(await e.client.Signing.signUserMessage(t??await We(e,r),n,a))}catch(i){throw ae(i)?te(i):i}},ZT=e=>async({userToken:t,userId:r,xRequestId:a,...n})=>{try{return re(await e.client.Signing.signUserTransaction(t??await We(e,r),{...n},a))}catch(i){throw ae(i)?te(i):i}},eS=e=>async({userToken:t,userId:r,xRequestId:a,...n})=>{try{return re(await e.client.Signing.signUserTypedData(t??await We(e,r),n,a))}catch(i){throw ae(i)?te(i):i}},tS=({client:e})=>async({id:t})=>{try{return re(await e.TokenLookup.getTokenId(t))}catch(r){throw ae(r)?te(r):r}},aS=e=>async({userToken:t,userId:r,id:a,idempotencyKey:n,xRequestId:i})=>{try{return re(await e.client.Transactions.createUserTransactionAccelerateChallenge(t??await We(e,r),a,{idempotencyKey:n??Ut()},i))}catch(s){throw ae(s)?te(s):s}},rS=e=>async({userToken:t,userId:r,id:a,idempotencyKey:n,xRequestId:i})=>{try{return re(await e.client.Transactions.createUserTransactionCancelChallenge(t??await We(e,r),a,{idempotencyKey:n??Ut()},i))}catch(s){throw ae(s)?te(s):s}},nS=e=>async({userToken:t,userId:r,idempotencyKey:a,fee:n,xRequestId:i,...s})=>{try{return re(await e.client.Transactions.createUserTransactionTransferChallenge(t??await We(e,r),{idempotencyKey:a??Ut(),...n.config,...s},i))}catch(o){throw ae(o)?te(o):o}},sS=e=>async({userToken:t,userId:r,idempotencyKey:a,fee:n,xRequestId:i,...s})=>{try{return re(await e.client.Transactions.createUserTransactionContractExecutionChallenge(t??await We(e,r),{idempotencyKey:a??Ut(),...n.config,...s},i))}catch(o){throw ae(o)?te(o):o}},iS=e=>async({userId:t,userToken:r,source:a,xRequestId:n,...i})=>{try{return re(await e.client.Transactions.createTransactionEstimateFee(r??await We(e,t),{...i,...a},n))}catch(s){throw ae(s)?te(s):s}},oS=e=>async({userToken:t,userId:r,amount:a,xRequestId:n,...i})=>{try{return re(await e.client.Transactions.createTransferEstimateFee(t??await We(e,r),{amounts:a,...i},n))}catch(s){throw ae(s)?te(s):s}},cS=e=>async({id:t,userToken:r,userId:a,txType:n,xRequestId:i})=>{try{return re(await e.client.Transactions.getTransaction(t,r??await We(e,a),n,i))}catch(s){throw ae(s)?te(s):s}},lS=({client:e})=>async({blockchain:t,address:r,walletId:a,xRequestId:n}={})=>{try{return re(await e.Transactions.getLowestNonceTransaction(t,r,a,{headers:n?{"X-Request-Id":n}:void 0}))}catch(i){throw ae(i)?te(i):i}},uS=e=>async({userToken:t,blockchain:r,destinationAddress:a,includeAll:n,operation:i,state:s,txHash:o,txType:c,userId:l,walletIds:u,from:p,pageAfter:d,pageBefore:g,pageSize:h,to:y,order:b,xRequestId:E})=>{try{return re(await e.client.Transactions.listTransactions(t??await We(e,l),r,a,n,i,s,o,c,l,u?.join(","),p,y,g,d,h,b,E))}catch(I){throw ae(I)?te(I):I}},pS=({client:e})=>async t=>{try{return re(await e.Transactions.createValidateAddress(t))}catch(r){throw ae(r)?te(r):r}},dS=({client:e})=>async({...t})=>{try{return re(await e.PINAuthentication.createUser({...t}))}catch(r){throw ae(r)?te(r):r}},fS=e=>async({userToken:t,idempotencyKey:r,userId:a,xRequestId:n,...i})=>{try{return re(await e.client.SocialEmailAuthentication.resendOTP(t??await We(e,a),{idempotencyKey:r??Ut(),...i},n))}catch(s){throw ae(s)?te(s):s}},hS=({client:e})=>async({idempotencyKey:t,xRequestId:r,...a})=>{try{return re(await e.SocialEmailAuthentication.createDeviceTokenEmailLogin({idempotencyKey:t??Ut(),...a},r))}catch(n){throw ae(n)?te(n):n}},mS=({client:e})=>async({userId:t,xRequestId:r})=>{try{return re(await e.Users.getUser(t,r))}catch(a){throw ae(a)?te(a):a}},vS=({client:e})=>async({userToken:t,xRequestId:r})=>{try{return re(await e.Users.getUserByToken(t,r))}catch(a){throw ae(a)?te(a):a}},gS=({client:e})=>async({userToken:t,challengeId:r,xRequestId:a})=>{try{return re(await e.Users.getUserChallenge(t,r,a))}catch(n){throw ae(n)?te(n):n}},xS=({client:e})=>async({pinStatus:t,securityQuestionStatus:r,from:a,to:n,pageBefore:i,pageAfter:s,pageSize:o,order:c,xRequestId:l}={})=>{try{return re(await e.Users.listUsers(t,r,a,n,i,s,o,c,l))}catch(u){throw ae(u)?te(u):u}},yS=({client:e})=>async({userToken:t,challengeStatus:r,xRequestId:a})=>{try{return re(await e.Users.listUserChallenges(t,r,a))}catch(n){throw ae(n)?te(n):n}},bS=e=>async({userId:t,userToken:r,deviceId:a,idempotencyKey:n,refreshToken:i,xRequestId:s})=>{try{return re(await e.client.SocialEmailAuthentication.refreshUserToken(r??await We(e,t),{idempotencyKey:n??Ut(),refreshToken:i,deviceId:a},s))}catch(o){throw ae(o)?te(o):o}},ES=({client:e})=>async({idempotencyKey:t,xRequestId:r,...a})=>{try{return re(await e.SocialEmailAuthentication.createDeviceTokenSocialLogin({idempotencyKey:t??Ut(),...a},r))}catch(n){throw ae(n)?te(n):n}},CS=e=>async({userToken:t,userId:r,idempotencyKey:a,accountType:n="EOA",xRequestId:i,...s})=>{try{return re(await e.client.Wallets.createUserWallet(t??await We(e,r),{idempotencyKey:a??Ut(),accountType:n,...s},i))}catch(o){throw ae(o)?te(o):o}},TS=e=>async({id:t,userToken:r,userId:a,xRequestId:n})=>{try{return re(await e.client.Wallets.getWallet(t,r??await We(e,a),n))}catch(i){throw ae(i)?te(i):i}},SS=e=>async({walletId:t,userToken:r,userId:a,includeAll:n,name:i,pageAfter:s,pageBefore:o,pageSize:c,tokenAddresses:l,standard:u,xRequestId:p})=>{try{return re(await e.client.Wallets.listWalletNfts(r??await We(e,a),t,n,i,l?.join(","),u,o,s,c,p))}catch(d){throw ae(d)?te(d):d}},wS=e=>async({walletId:t,userToken:r,userId:a,includeAll:n,name:i,pageAfter:s,pageBefore:o,pageSize:c,tokenAddresses:l,standard:u,xRequestId:p})=>{try{return re(await e.client.Wallets.listWalletBalance(r??await We(e,a),t,n,i,l?.join(","),u,o,s,c,p))}catch(d){throw ae(d)?te(d):d}},AS=e=>async({userId:t,userToken:r,address:a,blockchain:n,from:i,pageAfter:s,pageBefore:o,pageSize:c,to:l,walletSetId:u,refId:p,scaCore:d,order:g,xRequestId:h})=>{try{return re(await e.client.Wallets.listWallets(r??await We(e,t),a,n,d,u,p,i,l,o,s,c,g,h))}catch(y){throw ae(y)?te(y):y}},IS=e=>async({id:t,name:r,refId:a,userToken:n,userId:i})=>{try{return re(await e.client.Wallets.updateWallet(t,n??await We(e,i),{name:r,refId:a}))}catch(s){throw ae(s)?te(s):s}};var BS=Object.defineProperty,RS=(e,t,r)=>t in e?BS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kS=(e,t,r)=>RS(e,typeof t!="symbol"?t+"":t,r);const xp="https://api.circle.com";class ih{constructor(t){kS(this,"params");const{apiKey:r,baseUrl:a,storage:n,userAgent:i,headers:s}=t;this.params={client:new Ky(a??xp,{apiKey:r,version:nh,userAgent:i},s),configurationsClient:new hy(a??xp,{apiKey:r,version:nh,userAgent:i},s),storage:n??new rb}}createUserPin(t){return WT(this.params)(t)}createUserPinWithWallets(t){return XT(this.params)(t)}updateUserPin(t){return YT(this.params)(t)}restoreUserPin(t){return QT(this.params)(t)}createDeviceTokenForEmailLogin(t){return hS(this.params)(t)}createDeviceTokenForSocialLogin(t){return ES(this.params)(t)}refreshUserToken(t){return bS(this.params)(t)}resendOTP(t){return fS(this.params)(t)}createWallet(t){return CS(this.params)(t)}listWallets(t){return AS(this.params)(t)}getWallet(t){return TS(this.params)(t)}updateWallet(t){return IS(this.params)(t)}getWalletTokenBalance(t){return wS(this.params)(t)}getWalletNFTBalance(t){return SS(this.params)(t)}accelerateTransaction(t){return aS(this.params)(t)}createTransaction(t){return nS(this.params)(t)}cancelTransaction(t){return rS(this.params)(t)}getTransaction(t){return cS(this.params)(t)}listTransactions(t){return uS(this.params)(t)}estimateContractExecutionFee(t){return iS(this.params)(t)}createUserTransactionContractExecutionChallenge(t){return sS(this.params)(t)}estimateTransferFee(t){return oS(this.params)(t)}validateAddress(t){return pS(this.params)(t)}getLowestNonceTransaction(t){return lS(this.params)(t)}createUser(t){return dS(this.params)(t)}getUser(t){return mS(this.params)(t)}getUserStatus(t){return vS(this.params)(t)}listUsers(t){return xS(this.params)(t)}createUserToken(t){return sh(this.params)(t)}getUserChallenge(t){return gS(this.params)(t)}listUserChallenges(t){return yS(this.params)(t)}getToken(t){return tS(this.params)(t)}signMessage(t){return JT(this.params)(t)}signTransaction(t){return ZT(this.params)(t)}signTypedData(t){return eS(this.params)(t)}requestTestnetTokens(t){return $T(this.params)(t)}createMonitoredTokens(t){return K1(this.params)(t)}updateMonitoredTokens(t){return $1(this.params)(t)}listMonitoredTokens(t){return H1(this.params)(t)}deleteMonitoredTokens(t){return z1(this.params)(t)}updateMonitoredTokensScope(t){return G1(this.params)(t)}createSubscription(t){return W1(this.params)(t)}deleteSubscription(t){return X1(this.params)(t)}getSubscription(t){return Q1(this.params)(t)}getNotificationSignature(t){return Y1(this.params)(t)}listSubscriptions(){return J1(this.params)()}updateSubscription(t){return Z1(this.params)(t)}}function _S(e){return new ih(e)}export{Ir as BadGatewayError,br as BadRequestError,qy as Blockchain,ih as CircleUserControlledWalletsClient,Ur as ConnectionAbortedError,kr as ConnectionRefusedError,Or as ConnectionResetError,_r as ConnectionTimeoutError,Nr as DNSNotFoundError,Lr as DNSTimeoutError,Bu as Error110700,Ru as Error110701,ku as Error110702,_u as Error110703,Fr as Error155101,Vr as Error155102,qr as Error155103,Mr as Error155104,jr as Error155105,Kr as Error155106,zr as Error155107,Hr as Error155108,$r as Error155109,Gr as Error155110,Wr as Error155111,Xr as Error155112,Qr as Error155113,Yr as Error155114,Jr as Error155115,Zr as Error155116,en as Error155117,tn as Error155118,an as Error155119,rn as Error155120,nn as Error155121,sn as Error155122,on as Error155123,cn as Error155124,ln as Error155130,un as Error155131,pn as Error155132,dn as Error155133,fn as Error155134,hn as Error155135,mn as Error155136,vn as Error155137,gn as Error155138,xn as Error155139,yn as Error155140,bn as Error155141,En as Error155142,Cn as Error155143,Tn as Error155144,Sn as Error155145,wn as Error155146,An as Error155150,In as Error155151,Bn as Error155152,Rn as Error155154,kn as Error155155,_n as Error155156,Un as Error155157,Nn as Error155158,Ln as Error155159,Pn as Error155160,On as Error155201,Dn as Error155202,Fn as Error155203,Vn as Error155204,qn as Error155205,Mn as Error155206,jn as Error155207,Kn as Error155208,zn as Error155209,Hn as Error155210,$n as Error155211,Gn as Error155215,Wn as Error155218,Xn as Error155219,Qn as Error155220,Yn as Error155221,Jn as Error155222,Zn as Error155223,es as Error155224,ts as Error155225,as as Error155226,rs as Error155227,ns as Error155228,ss as Error155229,is as Error155230,os as Error155231,cs as Error155232,ls as Error155233,us as Error155234,ps as Error155235,ds as Error155236,fs as Error155237,hs as Error155238,ms as Error155239,vs as Error155240,gs as Error155241,xs as Error155242,ys as Error155243,bs as Error155244,Es as Error155245,Cs as Error155247,Ts as Error155254,Ss as Error155257,ws as Error155258,As as Error155262,Is as Error155264,Bs as Error155501,Rs as Error155502,ks as Error155503,_s as Error155504,Us as Error155505,Ns as Error155506,Ls as Error155507,Ps as Error155508,Os as Error155509,Ds as Error155510,Fs as Error155511,Vs as Error155512,qs as Error155514,Ms as Error155515,js as Error155516,Ks as Error155517,zs as Error155601,Hs as Error155701,$s as Error155702,Gs as Error155703,Ws as Error155704,Xs as Error155705,Qs as Error155706,Ys as Error155707,Js as Error155708,Zs as Error155709,ei as Error155710,ti as Error155711,ai as Error155712,ri as Error155713,ni as Error155714,si as Error155715,ii as Error155716,oi as Error155717,ci as Error155718,li as Error155719,ui as Error155720,pi as Error155721,di as Error155801,fi as Error155802,hi as Error155803,mi as Error155804,vi as Error155805,gi as Error155806,xi as Error155807,yi as Error155808,bi as Error156001,Ei as Error156002,Ci as Error156003,Ti as Error156004,Si as Error156005,wi as Error156006,Ai as Error156007,Ii as Error156008,Bi as Error156009,Ri as Error156010,ki as Error156011,_i as Error156012,Ui as Error156013,Ni as Error156014,Li as Error156015,Pi as Error156016,Oi as Error156017,Di as Error156018,Fi as Error156019,Vi as Error156020,qi as Error156021,Mi as Error156023,ji as Error156024,Ki as Error156025,zi as Error156026,Hi as Error156027,$i as Error156030,Gi as Error156031,Wi as Error156032,Xi as Error175001,Qi as Error175002,Yi as Error175003,Ji as Error175004,Zi as Error175005,eo as Error175006,to as Error175007,ao as Error175008,ro as Error175009,no as Error175010,so as Error175011,io as Error175012,oo as Error175013,co as Error175201,lo as Error175202,uo as Error175203,po as Error175204,fo as Error175205,ho as Error175301,mo as Error175302,vo as Error175303,go as Error175401,xo as Error175402,yo as Error175403,bo as Error175404,Eo as Error175405,Co as Error175406,To as Error175407,So as Error175408,wo as Error175409,Ao as Error175410,Io as Error177001,Bo as Error177002,Ro as Error177003,ko as Error177004,_o as Error177005,Uo as Error177006,No as Error177007,Lo as Error177008,Po as Error177009,Oo as Error177010,Do as Error177011,Fo as Error177012,Vo as Error177013,qo as Error177014,Mo as Error177015,jo as Error177016,Ko as Error177017,zo as Error177018,Ho as Error177019,$o as Error177020,Go as Error177021,Wo as Error177022,Xo as Error177023,Qo as Error177024,Yo as Error177025,Jo as Error177026,Zo as Error177301,ec as Error177302,tc as Error177303,ac as Error177304,rc as Error177305,nc as Error177601,sc as Error177602,ic as Error177603,oc as Error177604,cc as Error177605,lc as Error177606,uc as Error177607,pc as Error177901,Cr as ForbiddenError,Rr as GatewayTimeoutError,Dr as HostUnreachableError,yr as HttpError,Lt as HttpRequestError,C as HttpResponseError,wr as InternalServerError,Pr as NetworkUnreachableError,Tr as NotFoundError,Ar as NotImplementedError,Sr as RatelimitError,Br as ServiceUnavailableError,Er as UnauthorizedError,xp as defaultBaseUrl,te as fromAxiosError,_S as initiateUserControlledWalletsClient};
|
package/package.json
CHANGED