@avalabs/vm-module-types 1.4.6 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account.cjs +2 -2
- package/dist/account.d.cts +29 -2
- package/dist/account.d.ts +29 -2
- package/dist/account.js +1 -1
- package/dist/balance.d.cts +14 -2
- package/dist/balance.d.ts +14 -2
- package/dist/chunk-E4CYP2GV.js +5 -0
- package/dist/chunk-E4CYP2GV.js.map +1 -0
- package/dist/{chunk-T3QBBZUZ.js → chunk-FTYN6IZV.js} +2 -2
- package/dist/chunk-FTYN6IZV.js.map +1 -0
- package/dist/chunk-GF7C4PA6.js +3 -0
- package/dist/{chunk-7Y6UGMPZ.js → chunk-GMF7R4KJ.js} +2 -2
- package/dist/chunk-GMF7R4KJ.js.map +1 -0
- package/dist/chunk-M2ZWWM4H.js +5 -0
- package/dist/chunk-M2ZWWM4H.js.map +1 -0
- package/dist/{chunk-2KGTZTXY.cjs → chunk-N7PCIGVW.cjs} +2 -2
- package/dist/chunk-N7PCIGVW.cjs.map +1 -0
- package/dist/chunk-SAQJRAJ4.cjs +9 -0
- package/dist/chunk-SAQJRAJ4.cjs.map +1 -0
- package/dist/{chunk-IQHOBS5Y.cjs → chunk-VH6PRR45.cjs} +2 -2
- package/dist/chunk-VH6PRR45.cjs.map +1 -0
- package/dist/chunk-Y465KEXP.cjs +7 -0
- package/dist/chunk-Y465KEXP.cjs.map +1 -0
- package/dist/{chunk-ATL7CLLW.cjs → chunk-YB5EN6FL.cjs} +1 -1
- package/dist/common.cjs +4 -4
- package/dist/common.d.cts +5 -2
- package/dist/common.d.ts +5 -2
- package/dist/common.js +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.d.cts +4 -5
- package/dist/index.d.ts +4 -5
- package/dist/index.js +5 -5
- package/dist/module.cjs +2 -2
- package/dist/module.d.cts +9 -5
- package/dist/module.d.ts +9 -5
- package/dist/module.js +2 -2
- package/dist/{rpc-c6776d81.d.ts → rpc-d3af2845.d.ts} +18 -2
- package/dist/{rpc-ab7acd4d.d.ts → rpc-e02a5305.d.ts} +18 -2
- package/dist/rpc.cjs +4 -4
- package/dist/rpc.d.cts +1 -1
- package/dist/rpc.d.ts +1 -1
- package/dist/rpc.js +1 -1
- package/dist/token.cjs +2 -2
- package/dist/token.d.cts +16 -3
- package/dist/token.d.ts +16 -3
- package/dist/token.js +1 -1
- package/dist/transaction-simulation.d.cts +1 -1
- package/dist/transaction-simulation.d.ts +1 -1
- package/package.json +4 -5
- package/dist/chunk-2DSAT5RW.js +0 -3
- package/dist/chunk-2KGTZTXY.cjs.map +0 -1
- package/dist/chunk-6JAA7W6A.cjs +0 -7
- package/dist/chunk-6JAA7W6A.cjs.map +0 -1
- package/dist/chunk-7Y6UGMPZ.js.map +0 -1
- package/dist/chunk-I5OST5LZ.js +0 -5
- package/dist/chunk-I5OST5LZ.js.map +0 -1
- package/dist/chunk-IMMJESZ3.cjs +0 -9
- package/dist/chunk-IMMJESZ3.cjs.map +0 -1
- package/dist/chunk-IQHOBS5Y.cjs.map +0 -1
- package/dist/chunk-T3QBBZUZ.js.map +0 -1
- package/dist/chunk-UN6P2KX4.js +0 -5
- package/dist/chunk-UN6P2KX4.js.map +0 -1
- /package/dist/{chunk-2DSAT5RW.js.map → chunk-GF7C4PA6.js.map} +0 -0
- /package/dist/{chunk-ATL7CLLW.cjs.map → chunk-YB5EN6FL.cjs.map} +0 -0
package/dist/account.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkY465KEXP_cjs = require('./chunk-Y465KEXP.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, 'WalletType', {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkY465KEXP_cjs.a; }
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=out.js.map
|
|
12
12
|
//# sourceMappingURL=account.cjs.map
|
package/dist/account.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Network } from './common.cjs';
|
|
1
|
+
import { Network, NetworkVMType } from './common.cjs';
|
|
2
2
|
import './token.cjs';
|
|
3
3
|
|
|
4
4
|
declare enum WalletType {
|
|
@@ -16,6 +16,33 @@ type GetAddressParams = {
|
|
|
16
16
|
xpubXP?: string;
|
|
17
17
|
};
|
|
18
18
|
type GetAddressResponse = Record<string, string>;
|
|
19
|
+
type SimpleDeriveAddressParams = {
|
|
20
|
+
network: Omit<Network, 'tokens'>;
|
|
21
|
+
/**
|
|
22
|
+
* ID of the secret key to use for derivation.
|
|
23
|
+
*/
|
|
24
|
+
secretId: string;
|
|
25
|
+
};
|
|
26
|
+
type DetailedDeriveAddressParams = SimpleDeriveAddressParams & {
|
|
27
|
+
/**
|
|
28
|
+
* Account index for which the public key is requested.
|
|
29
|
+
* Leave empty if requesting a public key for a single-account private key.
|
|
30
|
+
*/
|
|
31
|
+
accountIndex: number;
|
|
32
|
+
/**
|
|
33
|
+
* Type of the derivation path to use.
|
|
34
|
+
* Useful when working with Ledger devices, which support BIP44 and Ledger Live derivation paths.
|
|
35
|
+
*/
|
|
36
|
+
derivationPathType: DerivationPathType;
|
|
37
|
+
};
|
|
38
|
+
type DeriveAddressParams = SimpleDeriveAddressParams | DetailedDeriveAddressParams;
|
|
39
|
+
type DeriveAddressResponse = Partial<Record<NetworkVMType, string>>;
|
|
40
|
+
type DerivationPathType = 'bip44' | 'ledger_live';
|
|
41
|
+
type BuildDerivationPathParams = {
|
|
42
|
+
accountIndex: number;
|
|
43
|
+
derivationPathType: DerivationPathType;
|
|
44
|
+
};
|
|
45
|
+
type BuildDerivationPathResponse = Partial<Record<NetworkVMType, string>>;
|
|
19
46
|
type PubKeyType = {
|
|
20
47
|
evm: string;
|
|
21
48
|
/**
|
|
@@ -34,4 +61,4 @@ type BtcWalletPolicyDetails = {
|
|
|
34
61
|
name: string;
|
|
35
62
|
};
|
|
36
63
|
|
|
37
|
-
export { BtcWalletPolicyDetails, GetAddressParams, GetAddressResponse, PubKeyType, WalletType };
|
|
64
|
+
export { BtcWalletPolicyDetails, BuildDerivationPathParams, BuildDerivationPathResponse, DerivationPathType, DeriveAddressParams, DeriveAddressResponse, DetailedDeriveAddressParams, GetAddressParams, GetAddressResponse, PubKeyType, SimpleDeriveAddressParams, WalletType };
|
package/dist/account.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Network } from './common.js';
|
|
1
|
+
import { Network, NetworkVMType } from './common.js';
|
|
2
2
|
import './token.js';
|
|
3
3
|
|
|
4
4
|
declare enum WalletType {
|
|
@@ -16,6 +16,33 @@ type GetAddressParams = {
|
|
|
16
16
|
xpubXP?: string;
|
|
17
17
|
};
|
|
18
18
|
type GetAddressResponse = Record<string, string>;
|
|
19
|
+
type SimpleDeriveAddressParams = {
|
|
20
|
+
network: Omit<Network, 'tokens'>;
|
|
21
|
+
/**
|
|
22
|
+
* ID of the secret key to use for derivation.
|
|
23
|
+
*/
|
|
24
|
+
secretId: string;
|
|
25
|
+
};
|
|
26
|
+
type DetailedDeriveAddressParams = SimpleDeriveAddressParams & {
|
|
27
|
+
/**
|
|
28
|
+
* Account index for which the public key is requested.
|
|
29
|
+
* Leave empty if requesting a public key for a single-account private key.
|
|
30
|
+
*/
|
|
31
|
+
accountIndex: number;
|
|
32
|
+
/**
|
|
33
|
+
* Type of the derivation path to use.
|
|
34
|
+
* Useful when working with Ledger devices, which support BIP44 and Ledger Live derivation paths.
|
|
35
|
+
*/
|
|
36
|
+
derivationPathType: DerivationPathType;
|
|
37
|
+
};
|
|
38
|
+
type DeriveAddressParams = SimpleDeriveAddressParams | DetailedDeriveAddressParams;
|
|
39
|
+
type DeriveAddressResponse = Partial<Record<NetworkVMType, string>>;
|
|
40
|
+
type DerivationPathType = 'bip44' | 'ledger_live';
|
|
41
|
+
type BuildDerivationPathParams = {
|
|
42
|
+
accountIndex: number;
|
|
43
|
+
derivationPathType: DerivationPathType;
|
|
44
|
+
};
|
|
45
|
+
type BuildDerivationPathResponse = Partial<Record<NetworkVMType, string>>;
|
|
19
46
|
type PubKeyType = {
|
|
20
47
|
evm: string;
|
|
21
48
|
/**
|
|
@@ -34,4 +61,4 @@ type BtcWalletPolicyDetails = {
|
|
|
34
61
|
name: string;
|
|
35
62
|
};
|
|
36
63
|
|
|
37
|
-
export { BtcWalletPolicyDetails, GetAddressParams, GetAddressResponse, PubKeyType, WalletType };
|
|
64
|
+
export { BtcWalletPolicyDetails, BuildDerivationPathParams, BuildDerivationPathResponse, DerivationPathType, DeriveAddressParams, DeriveAddressResponse, DetailedDeriveAddressParams, GetAddressParams, GetAddressResponse, PubKeyType, SimpleDeriveAddressParams, WalletType };
|
package/dist/account.js
CHANGED
package/dist/balance.d.cts
CHANGED
|
@@ -44,6 +44,15 @@ type TokenWithBalanceERC20 = TokenBalanceDataWithDecimals & TokenMarketData & Ne
|
|
|
44
44
|
type: TokenType.ERC20;
|
|
45
45
|
reputation: Erc20TokenBalance.tokenReputation | null;
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* SPL TokenWithBalance interface.
|
|
49
|
+
*/
|
|
50
|
+
type TokenWithBalanceSPL = TokenBalanceDataWithDecimals & TokenMarketData & {
|
|
51
|
+
address: string;
|
|
52
|
+
type: TokenType.SPL;
|
|
53
|
+
logoUri?: string;
|
|
54
|
+
reputation: null;
|
|
55
|
+
};
|
|
47
56
|
type TokenWithBalanceEVM = NetworkTokenWithBalance | TokenWithBalanceERC20 | NftTokenWithBalance;
|
|
48
57
|
/**
|
|
49
58
|
* Bitcoin TokenWithBalance interface.
|
|
@@ -70,6 +79,9 @@ interface TokenWithBalanceBTC extends NetworkTokenWithBalance {
|
|
|
70
79
|
unconfirmedBalanceCurrencyDisplayValue?: string;
|
|
71
80
|
unconfirmedBalanceInCurrency?: number;
|
|
72
81
|
}
|
|
82
|
+
interface TokenWithBalanceSVM extends NetworkTokenWithBalance {
|
|
83
|
+
logoUri: string;
|
|
84
|
+
}
|
|
73
85
|
/**
|
|
74
86
|
* Avalanche TokenWithBalance interface.
|
|
75
87
|
*/
|
|
@@ -131,7 +143,7 @@ interface TokenAttribute {
|
|
|
131
143
|
name: string;
|
|
132
144
|
value: string;
|
|
133
145
|
}
|
|
134
|
-
type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM;
|
|
146
|
+
type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM | TokenWithBalanceSVM | TokenWithBalanceSPL;
|
|
135
147
|
type GetBalancesResponse = Record<string, Record<string, TokenWithBalance | Error> | Error>;
|
|
136
148
|
|
|
137
|
-
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM };
|
|
149
|
+
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM, TokenWithBalanceSPL, TokenWithBalanceSVM };
|
package/dist/balance.d.ts
CHANGED
|
@@ -44,6 +44,15 @@ type TokenWithBalanceERC20 = TokenBalanceDataWithDecimals & TokenMarketData & Ne
|
|
|
44
44
|
type: TokenType.ERC20;
|
|
45
45
|
reputation: Erc20TokenBalance.tokenReputation | null;
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* SPL TokenWithBalance interface.
|
|
49
|
+
*/
|
|
50
|
+
type TokenWithBalanceSPL = TokenBalanceDataWithDecimals & TokenMarketData & {
|
|
51
|
+
address: string;
|
|
52
|
+
type: TokenType.SPL;
|
|
53
|
+
logoUri?: string;
|
|
54
|
+
reputation: null;
|
|
55
|
+
};
|
|
47
56
|
type TokenWithBalanceEVM = NetworkTokenWithBalance | TokenWithBalanceERC20 | NftTokenWithBalance;
|
|
48
57
|
/**
|
|
49
58
|
* Bitcoin TokenWithBalance interface.
|
|
@@ -70,6 +79,9 @@ interface TokenWithBalanceBTC extends NetworkTokenWithBalance {
|
|
|
70
79
|
unconfirmedBalanceCurrencyDisplayValue?: string;
|
|
71
80
|
unconfirmedBalanceInCurrency?: number;
|
|
72
81
|
}
|
|
82
|
+
interface TokenWithBalanceSVM extends NetworkTokenWithBalance {
|
|
83
|
+
logoUri: string;
|
|
84
|
+
}
|
|
73
85
|
/**
|
|
74
86
|
* Avalanche TokenWithBalance interface.
|
|
75
87
|
*/
|
|
@@ -131,7 +143,7 @@ interface TokenAttribute {
|
|
|
131
143
|
name: string;
|
|
132
144
|
value: string;
|
|
133
145
|
}
|
|
134
|
-
type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM;
|
|
146
|
+
type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM | TokenWithBalanceSVM | TokenWithBalanceSPL;
|
|
135
147
|
type GetBalancesResponse = Record<string, Record<string, TokenWithBalance | Error> | Error>;
|
|
136
148
|
|
|
137
|
-
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM };
|
|
149
|
+
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM, TokenWithBalanceSPL, TokenWithBalanceSVM };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/account.ts"],"names":["WalletType"],"mappings":"AAEO,IAAKA,OAEVA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,WAAa,cACbA,EAAA,SAAW,WACXA,EAAA,SAAW,WANDA,OAAA","sourcesContent":["import type { Network, NetworkVMType } from './common';\n\nexport enum WalletType {\n // Primary wallet types\n Mnemonic = 'mnemonic',\n Ledger = 'ledger',\n LedgerLive = 'ledger-live',\n Keystone = 'keystone',\n Seedless = 'seedless',\n}\n\nexport type GetAddressParams = {\n walletType: WalletType;\n accountIndex: number;\n xpub: string;\n network?: Network;\n xpubXP?: string;\n};\n\nexport type GetAddressResponse = Record<string, string>;\n\nexport type SimpleDeriveAddressParams = {\n network: Omit<Network, 'tokens'>;\n /**\n * ID of the secret key to use for derivation.\n */\n secretId: string;\n};\nexport type DetailedDeriveAddressParams = SimpleDeriveAddressParams & {\n /**\n * Account index for which the public key is requested.\n * Leave empty if requesting a public key for a single-account private key.\n */\n accountIndex: number;\n /**\n * Type of the derivation path to use.\n * Useful when working with Ledger devices, which support BIP44 and Ledger Live derivation paths.\n */\n derivationPathType: DerivationPathType;\n};\n\nexport type DeriveAddressParams = SimpleDeriveAddressParams | DetailedDeriveAddressParams;\n\nexport type DeriveAddressResponse = Partial<Record<NetworkVMType, string>>;\n\nexport type DerivationPathType = 'bip44' | 'ledger_live';\nexport type BuildDerivationPathParams = { accountIndex: number; derivationPathType: DerivationPathType };\nexport type BuildDerivationPathResponse = Partial<Record<NetworkVMType, string>>;\n\nexport type PubKeyType = {\n evm: string;\n /**\n * Public keys used for X/P chain are from a different derivation path.\n */\n xp?: string;\n btcWalletPolicyDetails?: BtcWalletPolicyDetails;\n};\n\nexport type BtcWalletPolicyDetails = {\n hmacHex: string;\n /**\n * Extended public key of m/44'/60'/n\n */\n xpub: string;\n masterFingerprint: string;\n name: string;\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var n=(t=>(t.BITCOIN_SEND_TRANSACTION="bitcoin_sendTransaction",t.BITCOIN_SIGN_TRANSACTION="bitcoin_signTransaction",t.ETH_SEND_TRANSACTION="eth_sendTransaction",t.ETH_SEND_TRANSACTION_BATCH="eth_sendTransactionBatch",t.SIGN_TYPED_DATA_V3="eth_signTypedData_v3",t.SIGN_TYPED_DATA_V4="eth_signTypedData_v4",t.SIGN_TYPED_DATA_V1="eth_signTypedData_v1",t.SIGN_TYPED_DATA="eth_signTypedData",t.PERSONAL_SIGN="personal_sign",t.ETH_SIGN="eth_sign",t.AVALANCHE_SIGN_MESSAGE="avalanche_signMessage",t.AVALANCHE_SEND_TRANSACTION="avalanche_sendTransaction",t.AVALANCHE_SIGN_TRANSACTION="avalanche_signTransaction",t.HVM_SIGN_TRANSACTION="hvm_signTransaction",t))(n||{}),i=(e=>(e.TEXT="text",e.ADDRESS="address",e.NODE_ID="nodeID",e.CURRENCY="currency",e.FUNDS_RECIPIENT="fundsRecipient",e.DATA="data",e.DATE="date",e.LINK="link",e))(i||{}),r=(a=>(a.WARNING="Warning",a.DANGER="Danger",a.INFO="Info",a))(r||{});
|
|
1
|
+
var n=(t=>(t.BITCOIN_SEND_TRANSACTION="bitcoin_sendTransaction",t.BITCOIN_SIGN_TRANSACTION="bitcoin_signTransaction",t.ETH_SEND_TRANSACTION="eth_sendTransaction",t.ETH_SEND_TRANSACTION_BATCH="eth_sendTransactionBatch",t.SIGN_TYPED_DATA_V3="eth_signTypedData_v3",t.SIGN_TYPED_DATA_V4="eth_signTypedData_v4",t.SIGN_TYPED_DATA_V1="eth_signTypedData_v1",t.SIGN_TYPED_DATA="eth_signTypedData",t.PERSONAL_SIGN="personal_sign",t.ETH_SIGN="eth_sign",t.AVALANCHE_SIGN_MESSAGE="avalanche_signMessage",t.AVALANCHE_SEND_TRANSACTION="avalanche_sendTransaction",t.AVALANCHE_SIGN_TRANSACTION="avalanche_signTransaction",t.HVM_SIGN_TRANSACTION="hvm_signTransaction",t.SOLANA_SIGN_TRANSACTION="solana_signTransaction",t.SOLANA_SIGN_AND_SEND_TRANSACTION="solana_signAndSendTransaction",t))(n||{}),i=(e=>(e.TEXT="text",e.ADDRESS="address",e.NODE_ID="nodeID",e.CURRENCY="currency",e.FUNDS_RECIPIENT="fundsRecipient",e.DATA="data",e.DATE="date",e.LINK="link",e))(i||{}),r=(a=>(a.WARNING="Warning",a.DANGER="Danger",a.INFO="Info",a))(r||{});
|
|
2
2
|
|
|
3
3
|
export { n as a, i as b, r as c };
|
|
4
4
|
//# sourceMappingURL=out.js.map
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-FTYN6IZV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/rpc.ts"],"names":["RpcMethod","DetailItemType","AlertType"],"mappings":"AAQO,IAAKA,OAEVA,EAAA,yBAA2B,0BAC3BA,EAAA,yBAA2B,0BAG3BA,EAAA,qBAAuB,sBACvBA,EAAA,2BAA6B,2BAC7BA,EAAA,mBAAqB,uBACrBA,EAAA,mBAAqB,uBACrBA,EAAA,mBAAqB,uBACrBA,EAAA,gBAAkB,oBAClBA,EAAA,cAAgB,gBAChBA,EAAA,SAAW,WAGXA,EAAA,uBAAyB,wBACzBA,EAAA,2BAA6B,4BAC7BA,EAAA,2BAA6B,4BAG7BA,EAAA,qBAAuB,sBAGvBA,EAAA,wBAA0B,yBAC1BA,EAAA,iCAAmC,gCAzBzBA,OAAA,IAoFAC,OACVA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,QAAU,SACVA,EAAA,SAAW,WACXA,EAAA,gBAAkB,iBAClBA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,KAAO,OARGA,OAAA,IA8FAC,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,KAAO,OAHGA,OAAA","sourcesContent":["import type { TransactionRequest } from 'ethers';\nimport type { Avalanche, BitcoinInputUTXO, BitcoinOutputUTXO } from '@avalabs/core-wallets-sdk';\nimport type { Caip2ChainId, Hex } from './common';\nimport type { JsonRpcError, EthereumProviderError, OptionalDataWithOptionalCause } from '@metamask/rpc-errors';\nimport type { BalanceChange, TokenApprovals } from './transaction-simulation';\nimport type { TokenWithBalanceBTC } from './balance';\nimport type { TransactionPayload, VMABI } from 'hypersdk-client';\n\nexport enum RpcMethod {\n /* BTC */\n BITCOIN_SEND_TRANSACTION = 'bitcoin_sendTransaction',\n BITCOIN_SIGN_TRANSACTION = 'bitcoin_signTransaction',\n\n /* EVM */\n ETH_SEND_TRANSACTION = 'eth_sendTransaction',\n ETH_SEND_TRANSACTION_BATCH = 'eth_sendTransactionBatch',\n SIGN_TYPED_DATA_V3 = 'eth_signTypedData_v3',\n SIGN_TYPED_DATA_V4 = 'eth_signTypedData_v4',\n SIGN_TYPED_DATA_V1 = 'eth_signTypedData_v1',\n SIGN_TYPED_DATA = 'eth_signTypedData',\n PERSONAL_SIGN = 'personal_sign',\n ETH_SIGN = 'eth_sign',\n\n /* AVALANCHE */\n AVALANCHE_SIGN_MESSAGE = 'avalanche_signMessage',\n AVALANCHE_SEND_TRANSACTION = 'avalanche_sendTransaction',\n AVALANCHE_SIGN_TRANSACTION = 'avalanche_signTransaction',\n\n /* HVM */\n HVM_SIGN_TRANSACTION = 'hvm_signTransaction',\n\n /* SOLANA */\n SOLANA_SIGN_TRANSACTION = 'solana_signTransaction',\n SOLANA_SIGN_AND_SEND_TRANSACTION = 'solana_signAndSendTransaction',\n}\n\nexport type DappInfo = {\n name: string;\n url: string;\n icon: string;\n};\n\nexport type RpcRequest = {\n requestId: string;\n sessionId: string;\n method: RpcMethod;\n chainId: Caip2ChainId;\n params: unknown;\n dappInfo: DappInfo;\n context?: Record<string, unknown>; // for storing additional context information that's only relevant to the consumer\n};\n\nexport type RpcError =\n | JsonRpcError<OptionalDataWithOptionalCause>\n | EthereumProviderError<OptionalDataWithOptionalCause>;\n\nexport type RpcResponse<R = unknown, E extends RpcError = JsonRpcError<OptionalDataWithOptionalCause>> =\n | {\n result: R;\n }\n | {\n error: E;\n };\n\nexport interface MessageTypeProperty {\n name: string;\n type: string;\n}\n\nexport interface MessageTypes {\n EIP712Domain: MessageTypeProperty[];\n [additionalProperties: string]: MessageTypeProperty[];\n}\n\nexport interface TypedData<T extends MessageTypes> {\n types: T;\n primaryType: keyof T;\n domain: Record<string, unknown>;\n message: Record<string, unknown>;\n}\n\nexport type TypedDataV1 = { name: string; type: string; value: unknown }[];\n\nexport type DetailSection = {\n title?: string;\n items: DetailItem[];\n};\n\nexport type BaseDetailItem = {\n label: string;\n};\n\nexport enum DetailItemType {\n TEXT = 'text',\n ADDRESS = 'address',\n NODE_ID = 'nodeID',\n CURRENCY = 'currency',\n FUNDS_RECIPIENT = 'fundsRecipient',\n DATA = 'data',\n DATE = 'date',\n LINK = 'link',\n}\n\n// It's very similar as CurrencyItem, but we want the client apps\n// to treat the label as an address (recognize it if possible,\n// truncate otherwise).\nexport type FundsRecipientItem = BaseDetailItem & {\n type: DetailItemType.FUNDS_RECIPIENT;\n amount: bigint;\n maxDecimals: number;\n symbol: string;\n};\n\nexport type TextItem = BaseDetailItem & {\n type: DetailItemType.TEXT;\n value: string;\n alignment: 'vertical' | 'horizontal';\n};\n\nexport type AddressItem = BaseDetailItem & {\n type: DetailItemType.ADDRESS;\n value: string;\n};\n\nexport type NodeIDItem = BaseDetailItem & {\n type: DetailItemType.NODE_ID;\n value: string;\n};\n\nexport type CurrencyItem = BaseDetailItem & {\n type: DetailItemType.CURRENCY;\n value: bigint;\n maxDecimals: number;\n symbol: string;\n};\n\nexport type DataItem = BaseDetailItem & {\n type: DetailItemType.DATA;\n value: string;\n};\n\nexport type DateItem = BaseDetailItem & {\n type: DetailItemType.DATE;\n value: string;\n};\n\nexport type LinkItemValue = { url: string; name?: string; icon?: string };\n\nexport type LinkItem = BaseDetailItem & {\n type: DetailItemType.LINK;\n value: LinkItemValue;\n};\n\nexport type DetailItem =\n | string\n | TextItem\n | AddressItem\n | NodeIDItem\n | CurrencyItem\n | DataItem\n | DateItem\n | LinkItem\n | FundsRecipientItem;\n\nexport type DisplayData = {\n title: string;\n dAppInfo?: {\n name: string;\n action: string;\n logoUri?: string;\n };\n network: {\n chainId: number;\n name: string;\n logoUri?: string;\n };\n account?: string;\n details: DetailSection[];\n networkFeeSelector?: boolean;\n disclaimer?: string;\n alert?: Alert;\n balanceChange?: BalanceChange;\n tokenApprovals?: TokenApprovals;\n isSimulationSuccessful?: boolean;\n};\n\nexport enum AlertType {\n WARNING = 'Warning',\n DANGER = 'Danger',\n INFO = 'Info',\n}\n\nexport type AlertDetails = {\n title: string;\n description: string;\n detailedDescription?: string;\n actionTitles?: {\n proceed: string;\n reject: string;\n };\n};\n\nexport type Alert = {\n type: AlertType;\n details: AlertDetails;\n};\n\nexport type BitcoinExecuteTxData = {\n to: string;\n amount: number;\n feeRate: number;\n fee: number;\n gasLimit: number;\n balance: TokenWithBalanceBTC;\n inputs: BitcoinInputUTXO[];\n outputs: BitcoinOutputUTXO[];\n};\n\nexport type BitcoingSignTxData = {\n inputs: BitcoinInputUTXO[];\n outputs: BitcoinOutputUTXO[];\n};\n\nexport type SigningData =\n | {\n type: RpcMethod.SOLANA_SIGN_AND_SEND_TRANSACTION;\n account: string;\n data: string; // Base-64 encoded \"Wire Transaction\"\n }\n | {\n type: RpcMethod.SOLANA_SIGN_TRANSACTION;\n account: string;\n data: string; // Base-64 encoded \"Wire Transaction\"\n }\n | {\n type: RpcMethod.BITCOIN_SEND_TRANSACTION;\n account: string;\n data: BitcoinExecuteTxData;\n }\n | {\n type: RpcMethod.BITCOIN_SIGN_TRANSACTION;\n account: string;\n data: BitcoingSignTxData;\n }\n | SigningData_EthSendTx\n | {\n type: RpcMethod.ETH_SIGN | RpcMethod.PERSONAL_SIGN;\n account: string;\n data: string;\n }\n | {\n type: RpcMethod.SIGN_TYPED_DATA | RpcMethod.SIGN_TYPED_DATA_V1;\n account: string;\n data: TypedData<MessageTypes> | TypedDataV1;\n }\n | {\n type: RpcMethod.SIGN_TYPED_DATA_V3 | RpcMethod.SIGN_TYPED_DATA_V4;\n account: string;\n data: TypedData<MessageTypes>;\n }\n | {\n type: RpcMethod.AVALANCHE_SIGN_MESSAGE;\n data: string;\n accountIndex?: number;\n }\n | {\n type: RpcMethod.AVALANCHE_SEND_TRANSACTION;\n unsignedTxJson: string;\n data: Avalanche.Tx;\n vm: 'EVM' | 'AVM' | 'PVM';\n externalIndices?: number[];\n internalIndices?: number[];\n }\n | {\n type: RpcMethod.AVALANCHE_SIGN_TRANSACTION;\n unsignedTxJson: string;\n data: Avalanche.Tx;\n vm: 'EVM' | 'AVM' | 'PVM';\n ownSignatureIndices: [number, number][];\n }\n | {\n type: RpcMethod.HVM_SIGN_TRANSACTION;\n data: {\n abi: VMABI;\n txPayload: TransactionPayload;\n };\n };\n\nexport type SigningData_EthSendTx = {\n type: RpcMethod.ETH_SEND_TRANSACTION;\n account: string;\n data: TransactionRequest;\n};\n\nexport type EvmTxBatchUpdateFn = (\n data: { maxFeeRate?: bigint; maxTipRate?: bigint },\n txIndex: number,\n) => {\n displayData: DisplayData;\n signingRequests: {\n displayData: DisplayData;\n signingData: SigningData_EthSendTx;\n }[];\n};\n\nexport type EvmTxUpdateFn = (data: {\n maxFeeRate?: bigint;\n maxTipRate?: bigint;\n approvalLimit?: Hex; // as hexadecimal, 0x-prefixed\n}) => { displayData: DisplayData; signingData: SigningData_EthSendTx };\n\nexport type BtcTxUpdateFn = (data: { feeRate?: number }) => {\n displayData: DisplayData;\n signingData: Extract<SigningData, { type: RpcMethod.BITCOIN_SEND_TRANSACTION }>;\n};\n\nexport type SigningRequest<Data = SigningData> = {\n displayData: DisplayData;\n signingData: Data;\n updateTx?: EvmTxUpdateFn | BtcTxUpdateFn;\n};\n\nexport type ApprovalParams = {\n request: RpcRequest;\n} & SigningRequest;\n\nexport type BatchApprovalParams = {\n request: RpcRequest;\n signingRequests: SigningRequest<SigningData_EthSendTx>[];\n displayData: DisplayData;\n updateTx: EvmTxBatchUpdateFn;\n};\n\nexport type RequestPublicKeyParams = {\n secretId: string;\n curve: 'secp256k1' | 'ed25519';\n derivationPath?: string;\n};\n\n/**\n * We want to accept both a signed data (tx/message) and a tx hash as a response\n * coming in from the client apps, hence the XORs here.\n *\n * The reason we need to support both is because extension allows importing\n * external software wallets, such as Fireblocks or other apps that support\n * the WalletConnect protocol.\n *\n * My experience is that WalletConnect apps rarely, if ever, support\n * \"eth_signTransaction\" requests and more often only allow sending\n * \"eth_sendTransaction\" calls, which means that all we'll get in response\n * from them is the transaction hash (not a signed tx).\n */\ntype SignedData = { signedData: string };\ntype BroadcastedTx = { txHash: string };\n\nexport type SigningResult = SignedData | BroadcastedTx;\n\nexport type ApprovalResponse =\n | {\n error: RpcError;\n }\n | SigningResult;\n\nexport type BatchApprovalResponse =\n | { error: RpcError }\n | {\n result: SignedData[];\n };\nexport interface ApprovalController {\n requestApproval: (params: ApprovalParams) => Promise<ApprovalResponse>;\n requestPublicKey: (params: RequestPublicKeyParams) => Promise<string>;\n onTransactionConfirmed: (txHash: Hex, requestId: string) => void;\n onTransactionReverted: (txHash: Hex, requestId: string) => void;\n}\n\nexport interface BatchApprovalController extends ApprovalController {\n requestBatchApproval: (params: BatchApprovalParams) => Promise<BatchApprovalResponse>;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var e=(r=>(r.NATIVE="NATIVE",r.ERC20="ERC20",r.ERC721="ERC721",r.ERC1155="ERC1155",r.NONERC="NONERC",r))(e||{});
|
|
1
|
+
var e=(r=>(r.NATIVE="NATIVE",r.ERC20="ERC20",r.ERC721="ERC721",r.ERC1155="ERC1155",r.NONERC="NONERC",r.SPL="SPL",r))(e||{});
|
|
2
2
|
|
|
3
3
|
export { e as a };
|
|
4
4
|
//# sourceMappingURL=out.js.map
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-GMF7R4KJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/token.ts"],"names":["TokenType"],"mappings":"AAAO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,IAAM,MANIA,OAAA","sourcesContent":["export enum TokenType {\n NATIVE = 'NATIVE',\n ERC20 = 'ERC20',\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n NONERC = 'NONERC',\n SPL = 'SPL',\n}\n\nexport interface NetworkToken {\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n description?: string;\n}\n\nexport type NetworkContractToken = ERC20Token | ERC1155Token | ERC721Token | NONERCToken | SPLToken;\n\nexport interface ERC20Token {\n address: string;\n chainId?: number;\n color?: string;\n type: TokenType.ERC20;\n decimals: number;\n logoUri?: string;\n name: string;\n symbol: string;\n}\n\nexport interface SPLToken {\n address: string;\n name: string;\n symbol: string;\n // Discrepancy between what's returned by Proxy API and the other types here.\n // Proxy API returns `contractType`, but in VM Modules we populate `type`.\n contractType: TokenType.SPL;\n type: TokenType.SPL;\n caip2Id: string;\n decimals: number;\n chainId?: number;\n logoUri?: string;\n color?: string;\n}\n\nexport interface ERC1155Token {\n address: string;\n type: TokenType.ERC1155;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n\nexport interface ERC721Token {\n address: string;\n type: TokenType.ERC721;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n\nexport interface NONERCToken {\n address: string;\n type: TokenType.NONERC;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var o=(r=>(r.EVM="EVM",r.BITCOIN="BITCOIN",r.AVM="AVM",r.PVM="PVM",r.CoreEth="CoreEth",r.HVM="HVM",r.SVM="SVM",r))(o||{}),i=(e=>(e.PRODUCTION="production",e.DEV="dev",e))(i||{}),n=(t=>(t.CORE_MOBILE_IOS="core-mobile-ios",t.CORE_MOBILE_ANDROID="core-mobile-android",t.CORE_WEB="core-web",t.CORE_EXTENSION="core-extension",t.EXPLORER="explorer",t.OTHER="other",t))(n||{});
|
|
2
|
+
|
|
3
|
+
export { o as a, i as b, n as c };
|
|
4
|
+
//# sourceMappingURL=out.js.map
|
|
5
|
+
//# sourceMappingURL=chunk-M2ZWWM4H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common.ts"],"names":["NetworkVMType","Environment","AppName"],"mappings":"AAyBO,IAAKA,OACVA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MAPIA,OAAA,IAmBAC,OACVA,EAAA,WAAa,aACbA,EAAA,IAAM,MAFIA,OAAA,IAKAC,OACVA,EAAA,gBAAkB,kBAClBA,EAAA,oBAAsB,sBACtBA,EAAA,SAAW,WACXA,EAAA,eAAiB,iBACjBA,EAAA,SAAW,WACXA,EAAA,MAAQ,QANEA,OAAA","sourcesContent":["import type { NetworkContractToken, NetworkToken } from './token';\n\nexport type Network = {\n isTestnet?: boolean;\n chainId: number;\n caipId?: string;\n chainName: string;\n rpcUrl: string;\n utilityAddresses?: {\n multicall: string;\n };\n networkToken: NetworkToken;\n pricingProviders?: {\n coingecko: {\n assetPlatformId?: string;\n nativeTokenId?: string;\n };\n };\n tokens?: NetworkContractToken[];\n explorerUrl?: string;\n logoUri?: string;\n vmName: NetworkVMType;\n vmRpcPrefix?: string;\n};\n\nexport enum NetworkVMType {\n EVM = 'EVM',\n BITCOIN = 'BITCOIN',\n AVM = 'AVM',\n PVM = 'PVM',\n CoreEth = 'CoreEth',\n HVM = 'HVM',\n SVM = 'SVM',\n}\n\nexport type Storage = {\n get: <T>(id: string) => T | undefined;\n set: <T>(id: string, data: T) => void;\n};\n\nexport type Caip2ChainId = string;\n\nexport type Hex = `0x${string}`;\n\nexport enum Environment {\n PRODUCTION = 'production',\n DEV = 'dev',\n}\n\nexport enum AppName {\n CORE_MOBILE_IOS = 'core-mobile-ios',\n CORE_MOBILE_ANDROID = 'core-mobile-android',\n CORE_WEB = 'core-web',\n CORE_EXTENSION = 'core-extension',\n EXPLORER = 'explorer',\n OTHER = 'other',\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var e=(r=>(r.NATIVE="NATIVE",r.ERC20="ERC20",r.ERC721="ERC721",r.ERC1155="ERC1155",r.NONERC="NONERC",r))(e||{});
|
|
3
|
+
var e=(r=>(r.NATIVE="NATIVE",r.ERC20="ERC20",r.ERC721="ERC721",r.ERC1155="ERC1155",r.NONERC="NONERC",r.SPL="SPL",r))(e||{});
|
|
4
4
|
|
|
5
5
|
exports.a = e;
|
|
6
6
|
//# sourceMappingURL=out.js.map
|
|
7
|
-
//# sourceMappingURL=chunk-
|
|
7
|
+
//# sourceMappingURL=chunk-N7PCIGVW.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/token.ts"],"names":["TokenType"],"mappings":"AAAO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,IAAM,MANIA,OAAA","sourcesContent":["export enum TokenType {\n NATIVE = 'NATIVE',\n ERC20 = 'ERC20',\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n NONERC = 'NONERC',\n SPL = 'SPL',\n}\n\nexport interface NetworkToken {\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n description?: string;\n}\n\nexport type NetworkContractToken = ERC20Token | ERC1155Token | ERC721Token | NONERCToken | SPLToken;\n\nexport interface ERC20Token {\n address: string;\n chainId?: number;\n color?: string;\n type: TokenType.ERC20;\n decimals: number;\n logoUri?: string;\n name: string;\n symbol: string;\n}\n\nexport interface SPLToken {\n address: string;\n name: string;\n symbol: string;\n // Discrepancy between what's returned by Proxy API and the other types here.\n // Proxy API returns `contractType`, but in VM Modules we populate `type`.\n contractType: TokenType.SPL;\n type: TokenType.SPL;\n caip2Id: string;\n decimals: number;\n chainId?: number;\n logoUri?: string;\n color?: string;\n}\n\nexport interface ERC1155Token {\n address: string;\n type: TokenType.ERC1155;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n\nexport interface ERC721Token {\n address: string;\n type: TokenType.ERC721;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n\nexport interface NONERCToken {\n address: string;\n type: TokenType.NONERC;\n logoUri?: string;\n name?: string;\n symbol?: string;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var o=(r=>(r.EVM="EVM",r.BITCOIN="BITCOIN",r.AVM="AVM",r.PVM="PVM",r.CoreEth="CoreEth",r.HVM="HVM",r.SVM="SVM",r))(o||{}),i=(e=>(e.PRODUCTION="production",e.DEV="dev",e))(i||{}),n=(t=>(t.CORE_MOBILE_IOS="core-mobile-ios",t.CORE_MOBILE_ANDROID="core-mobile-android",t.CORE_WEB="core-web",t.CORE_EXTENSION="core-extension",t.EXPLORER="explorer",t.OTHER="other",t))(n||{});
|
|
4
|
+
|
|
5
|
+
exports.a = o;
|
|
6
|
+
exports.b = i;
|
|
7
|
+
exports.c = n;
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
9
|
+
//# sourceMappingURL=chunk-SAQJRAJ4.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common.ts"],"names":["NetworkVMType","Environment","AppName"],"mappings":"AAyBO,IAAKA,OACVA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MAPIA,OAAA,IAmBAC,OACVA,EAAA,WAAa,aACbA,EAAA,IAAM,MAFIA,OAAA,IAKAC,OACVA,EAAA,gBAAkB,kBAClBA,EAAA,oBAAsB,sBACtBA,EAAA,SAAW,WACXA,EAAA,eAAiB,iBACjBA,EAAA,SAAW,WACXA,EAAA,MAAQ,QANEA,OAAA","sourcesContent":["import type { NetworkContractToken, NetworkToken } from './token';\n\nexport type Network = {\n isTestnet?: boolean;\n chainId: number;\n caipId?: string;\n chainName: string;\n rpcUrl: string;\n utilityAddresses?: {\n multicall: string;\n };\n networkToken: NetworkToken;\n pricingProviders?: {\n coingecko: {\n assetPlatformId?: string;\n nativeTokenId?: string;\n };\n };\n tokens?: NetworkContractToken[];\n explorerUrl?: string;\n logoUri?: string;\n vmName: NetworkVMType;\n vmRpcPrefix?: string;\n};\n\nexport enum NetworkVMType {\n EVM = 'EVM',\n BITCOIN = 'BITCOIN',\n AVM = 'AVM',\n PVM = 'PVM',\n CoreEth = 'CoreEth',\n HVM = 'HVM',\n SVM = 'SVM',\n}\n\nexport type Storage = {\n get: <T>(id: string) => T | undefined;\n set: <T>(id: string, data: T) => void;\n};\n\nexport type Caip2ChainId = string;\n\nexport type Hex = `0x${string}`;\n\nexport enum Environment {\n PRODUCTION = 'production',\n DEV = 'dev',\n}\n\nexport enum AppName {\n CORE_MOBILE_IOS = 'core-mobile-ios',\n CORE_MOBILE_ANDROID = 'core-mobile-android',\n CORE_WEB = 'core-web',\n CORE_EXTENSION = 'core-extension',\n EXPLORER = 'explorer',\n OTHER = 'other',\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var n=(t=>(t.BITCOIN_SEND_TRANSACTION="bitcoin_sendTransaction",t.BITCOIN_SIGN_TRANSACTION="bitcoin_signTransaction",t.ETH_SEND_TRANSACTION="eth_sendTransaction",t.ETH_SEND_TRANSACTION_BATCH="eth_sendTransactionBatch",t.SIGN_TYPED_DATA_V3="eth_signTypedData_v3",t.SIGN_TYPED_DATA_V4="eth_signTypedData_v4",t.SIGN_TYPED_DATA_V1="eth_signTypedData_v1",t.SIGN_TYPED_DATA="eth_signTypedData",t.PERSONAL_SIGN="personal_sign",t.ETH_SIGN="eth_sign",t.AVALANCHE_SIGN_MESSAGE="avalanche_signMessage",t.AVALANCHE_SEND_TRANSACTION="avalanche_sendTransaction",t.AVALANCHE_SIGN_TRANSACTION="avalanche_signTransaction",t.HVM_SIGN_TRANSACTION="hvm_signTransaction",t))(n||{}),i=(e=>(e.TEXT="text",e.ADDRESS="address",e.NODE_ID="nodeID",e.CURRENCY="currency",e.FUNDS_RECIPIENT="fundsRecipient",e.DATA="data",e.DATE="date",e.LINK="link",e))(i||{}),r=(a=>(a.WARNING="Warning",a.DANGER="Danger",a.INFO="Info",a))(r||{});
|
|
3
|
+
var n=(t=>(t.BITCOIN_SEND_TRANSACTION="bitcoin_sendTransaction",t.BITCOIN_SIGN_TRANSACTION="bitcoin_signTransaction",t.ETH_SEND_TRANSACTION="eth_sendTransaction",t.ETH_SEND_TRANSACTION_BATCH="eth_sendTransactionBatch",t.SIGN_TYPED_DATA_V3="eth_signTypedData_v3",t.SIGN_TYPED_DATA_V4="eth_signTypedData_v4",t.SIGN_TYPED_DATA_V1="eth_signTypedData_v1",t.SIGN_TYPED_DATA="eth_signTypedData",t.PERSONAL_SIGN="personal_sign",t.ETH_SIGN="eth_sign",t.AVALANCHE_SIGN_MESSAGE="avalanche_signMessage",t.AVALANCHE_SEND_TRANSACTION="avalanche_sendTransaction",t.AVALANCHE_SIGN_TRANSACTION="avalanche_signTransaction",t.HVM_SIGN_TRANSACTION="hvm_signTransaction",t.SOLANA_SIGN_TRANSACTION="solana_signTransaction",t.SOLANA_SIGN_AND_SEND_TRANSACTION="solana_signAndSendTransaction",t))(n||{}),i=(e=>(e.TEXT="text",e.ADDRESS="address",e.NODE_ID="nodeID",e.CURRENCY="currency",e.FUNDS_RECIPIENT="fundsRecipient",e.DATA="data",e.DATE="date",e.LINK="link",e))(i||{}),r=(a=>(a.WARNING="Warning",a.DANGER="Danger",a.INFO="Info",a))(r||{});
|
|
4
4
|
|
|
5
5
|
exports.a = n;
|
|
6
6
|
exports.b = i;
|
|
7
7
|
exports.c = r;
|
|
8
8
|
//# sourceMappingURL=out.js.map
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
9
|
+
//# sourceMappingURL=chunk-VH6PRR45.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/rpc.ts"],"names":["RpcMethod","DetailItemType","AlertType"],"mappings":"AAQO,IAAKA,OAEVA,EAAA,yBAA2B,0BAC3BA,EAAA,yBAA2B,0BAG3BA,EAAA,qBAAuB,sBACvBA,EAAA,2BAA6B,2BAC7BA,EAAA,mBAAqB,uBACrBA,EAAA,mBAAqB,uBACrBA,EAAA,mBAAqB,uBACrBA,EAAA,gBAAkB,oBAClBA,EAAA,cAAgB,gBAChBA,EAAA,SAAW,WAGXA,EAAA,uBAAyB,wBACzBA,EAAA,2BAA6B,4BAC7BA,EAAA,2BAA6B,4BAG7BA,EAAA,qBAAuB,sBAGvBA,EAAA,wBAA0B,yBAC1BA,EAAA,iCAAmC,gCAzBzBA,OAAA,IAoFAC,OACVA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,QAAU,SACVA,EAAA,SAAW,WACXA,EAAA,gBAAkB,iBAClBA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,KAAO,OARGA,OAAA,IA8FAC,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,KAAO,OAHGA,OAAA","sourcesContent":["import type { TransactionRequest } from 'ethers';\nimport type { Avalanche, BitcoinInputUTXO, BitcoinOutputUTXO } from '@avalabs/core-wallets-sdk';\nimport type { Caip2ChainId, Hex } from './common';\nimport type { JsonRpcError, EthereumProviderError, OptionalDataWithOptionalCause } from '@metamask/rpc-errors';\nimport type { BalanceChange, TokenApprovals } from './transaction-simulation';\nimport type { TokenWithBalanceBTC } from './balance';\nimport type { TransactionPayload, VMABI } from 'hypersdk-client';\n\nexport enum RpcMethod {\n /* BTC */\n BITCOIN_SEND_TRANSACTION = 'bitcoin_sendTransaction',\n BITCOIN_SIGN_TRANSACTION = 'bitcoin_signTransaction',\n\n /* EVM */\n ETH_SEND_TRANSACTION = 'eth_sendTransaction',\n ETH_SEND_TRANSACTION_BATCH = 'eth_sendTransactionBatch',\n SIGN_TYPED_DATA_V3 = 'eth_signTypedData_v3',\n SIGN_TYPED_DATA_V4 = 'eth_signTypedData_v4',\n SIGN_TYPED_DATA_V1 = 'eth_signTypedData_v1',\n SIGN_TYPED_DATA = 'eth_signTypedData',\n PERSONAL_SIGN = 'personal_sign',\n ETH_SIGN = 'eth_sign',\n\n /* AVALANCHE */\n AVALANCHE_SIGN_MESSAGE = 'avalanche_signMessage',\n AVALANCHE_SEND_TRANSACTION = 'avalanche_sendTransaction',\n AVALANCHE_SIGN_TRANSACTION = 'avalanche_signTransaction',\n\n /* HVM */\n HVM_SIGN_TRANSACTION = 'hvm_signTransaction',\n\n /* SOLANA */\n SOLANA_SIGN_TRANSACTION = 'solana_signTransaction',\n SOLANA_SIGN_AND_SEND_TRANSACTION = 'solana_signAndSendTransaction',\n}\n\nexport type DappInfo = {\n name: string;\n url: string;\n icon: string;\n};\n\nexport type RpcRequest = {\n requestId: string;\n sessionId: string;\n method: RpcMethod;\n chainId: Caip2ChainId;\n params: unknown;\n dappInfo: DappInfo;\n context?: Record<string, unknown>; // for storing additional context information that's only relevant to the consumer\n};\n\nexport type RpcError =\n | JsonRpcError<OptionalDataWithOptionalCause>\n | EthereumProviderError<OptionalDataWithOptionalCause>;\n\nexport type RpcResponse<R = unknown, E extends RpcError = JsonRpcError<OptionalDataWithOptionalCause>> =\n | {\n result: R;\n }\n | {\n error: E;\n };\n\nexport interface MessageTypeProperty {\n name: string;\n type: string;\n}\n\nexport interface MessageTypes {\n EIP712Domain: MessageTypeProperty[];\n [additionalProperties: string]: MessageTypeProperty[];\n}\n\nexport interface TypedData<T extends MessageTypes> {\n types: T;\n primaryType: keyof T;\n domain: Record<string, unknown>;\n message: Record<string, unknown>;\n}\n\nexport type TypedDataV1 = { name: string; type: string; value: unknown }[];\n\nexport type DetailSection = {\n title?: string;\n items: DetailItem[];\n};\n\nexport type BaseDetailItem = {\n label: string;\n};\n\nexport enum DetailItemType {\n TEXT = 'text',\n ADDRESS = 'address',\n NODE_ID = 'nodeID',\n CURRENCY = 'currency',\n FUNDS_RECIPIENT = 'fundsRecipient',\n DATA = 'data',\n DATE = 'date',\n LINK = 'link',\n}\n\n// It's very similar as CurrencyItem, but we want the client apps\n// to treat the label as an address (recognize it if possible,\n// truncate otherwise).\nexport type FundsRecipientItem = BaseDetailItem & {\n type: DetailItemType.FUNDS_RECIPIENT;\n amount: bigint;\n maxDecimals: number;\n symbol: string;\n};\n\nexport type TextItem = BaseDetailItem & {\n type: DetailItemType.TEXT;\n value: string;\n alignment: 'vertical' | 'horizontal';\n};\n\nexport type AddressItem = BaseDetailItem & {\n type: DetailItemType.ADDRESS;\n value: string;\n};\n\nexport type NodeIDItem = BaseDetailItem & {\n type: DetailItemType.NODE_ID;\n value: string;\n};\n\nexport type CurrencyItem = BaseDetailItem & {\n type: DetailItemType.CURRENCY;\n value: bigint;\n maxDecimals: number;\n symbol: string;\n};\n\nexport type DataItem = BaseDetailItem & {\n type: DetailItemType.DATA;\n value: string;\n};\n\nexport type DateItem = BaseDetailItem & {\n type: DetailItemType.DATE;\n value: string;\n};\n\nexport type LinkItemValue = { url: string; name?: string; icon?: string };\n\nexport type LinkItem = BaseDetailItem & {\n type: DetailItemType.LINK;\n value: LinkItemValue;\n};\n\nexport type DetailItem =\n | string\n | TextItem\n | AddressItem\n | NodeIDItem\n | CurrencyItem\n | DataItem\n | DateItem\n | LinkItem\n | FundsRecipientItem;\n\nexport type DisplayData = {\n title: string;\n dAppInfo?: {\n name: string;\n action: string;\n logoUri?: string;\n };\n network: {\n chainId: number;\n name: string;\n logoUri?: string;\n };\n account?: string;\n details: DetailSection[];\n networkFeeSelector?: boolean;\n disclaimer?: string;\n alert?: Alert;\n balanceChange?: BalanceChange;\n tokenApprovals?: TokenApprovals;\n isSimulationSuccessful?: boolean;\n};\n\nexport enum AlertType {\n WARNING = 'Warning',\n DANGER = 'Danger',\n INFO = 'Info',\n}\n\nexport type AlertDetails = {\n title: string;\n description: string;\n detailedDescription?: string;\n actionTitles?: {\n proceed: string;\n reject: string;\n };\n};\n\nexport type Alert = {\n type: AlertType;\n details: AlertDetails;\n};\n\nexport type BitcoinExecuteTxData = {\n to: string;\n amount: number;\n feeRate: number;\n fee: number;\n gasLimit: number;\n balance: TokenWithBalanceBTC;\n inputs: BitcoinInputUTXO[];\n outputs: BitcoinOutputUTXO[];\n};\n\nexport type BitcoingSignTxData = {\n inputs: BitcoinInputUTXO[];\n outputs: BitcoinOutputUTXO[];\n};\n\nexport type SigningData =\n | {\n type: RpcMethod.SOLANA_SIGN_AND_SEND_TRANSACTION;\n account: string;\n data: string; // Base-64 encoded \"Wire Transaction\"\n }\n | {\n type: RpcMethod.SOLANA_SIGN_TRANSACTION;\n account: string;\n data: string; // Base-64 encoded \"Wire Transaction\"\n }\n | {\n type: RpcMethod.BITCOIN_SEND_TRANSACTION;\n account: string;\n data: BitcoinExecuteTxData;\n }\n | {\n type: RpcMethod.BITCOIN_SIGN_TRANSACTION;\n account: string;\n data: BitcoingSignTxData;\n }\n | SigningData_EthSendTx\n | {\n type: RpcMethod.ETH_SIGN | RpcMethod.PERSONAL_SIGN;\n account: string;\n data: string;\n }\n | {\n type: RpcMethod.SIGN_TYPED_DATA | RpcMethod.SIGN_TYPED_DATA_V1;\n account: string;\n data: TypedData<MessageTypes> | TypedDataV1;\n }\n | {\n type: RpcMethod.SIGN_TYPED_DATA_V3 | RpcMethod.SIGN_TYPED_DATA_V4;\n account: string;\n data: TypedData<MessageTypes>;\n }\n | {\n type: RpcMethod.AVALANCHE_SIGN_MESSAGE;\n data: string;\n accountIndex?: number;\n }\n | {\n type: RpcMethod.AVALANCHE_SEND_TRANSACTION;\n unsignedTxJson: string;\n data: Avalanche.Tx;\n vm: 'EVM' | 'AVM' | 'PVM';\n externalIndices?: number[];\n internalIndices?: number[];\n }\n | {\n type: RpcMethod.AVALANCHE_SIGN_TRANSACTION;\n unsignedTxJson: string;\n data: Avalanche.Tx;\n vm: 'EVM' | 'AVM' | 'PVM';\n ownSignatureIndices: [number, number][];\n }\n | {\n type: RpcMethod.HVM_SIGN_TRANSACTION;\n data: {\n abi: VMABI;\n txPayload: TransactionPayload;\n };\n };\n\nexport type SigningData_EthSendTx = {\n type: RpcMethod.ETH_SEND_TRANSACTION;\n account: string;\n data: TransactionRequest;\n};\n\nexport type EvmTxBatchUpdateFn = (\n data: { maxFeeRate?: bigint; maxTipRate?: bigint },\n txIndex: number,\n) => {\n displayData: DisplayData;\n signingRequests: {\n displayData: DisplayData;\n signingData: SigningData_EthSendTx;\n }[];\n};\n\nexport type EvmTxUpdateFn = (data: {\n maxFeeRate?: bigint;\n maxTipRate?: bigint;\n approvalLimit?: Hex; // as hexadecimal, 0x-prefixed\n}) => { displayData: DisplayData; signingData: SigningData_EthSendTx };\n\nexport type BtcTxUpdateFn = (data: { feeRate?: number }) => {\n displayData: DisplayData;\n signingData: Extract<SigningData, { type: RpcMethod.BITCOIN_SEND_TRANSACTION }>;\n};\n\nexport type SigningRequest<Data = SigningData> = {\n displayData: DisplayData;\n signingData: Data;\n updateTx?: EvmTxUpdateFn | BtcTxUpdateFn;\n};\n\nexport type ApprovalParams = {\n request: RpcRequest;\n} & SigningRequest;\n\nexport type BatchApprovalParams = {\n request: RpcRequest;\n signingRequests: SigningRequest<SigningData_EthSendTx>[];\n displayData: DisplayData;\n updateTx: EvmTxBatchUpdateFn;\n};\n\nexport type RequestPublicKeyParams = {\n secretId: string;\n curve: 'secp256k1' | 'ed25519';\n derivationPath?: string;\n};\n\n/**\n * We want to accept both a signed data (tx/message) and a tx hash as a response\n * coming in from the client apps, hence the XORs here.\n *\n * The reason we need to support both is because extension allows importing\n * external software wallets, such as Fireblocks or other apps that support\n * the WalletConnect protocol.\n *\n * My experience is that WalletConnect apps rarely, if ever, support\n * \"eth_signTransaction\" requests and more often only allow sending\n * \"eth_sendTransaction\" calls, which means that all we'll get in response\n * from them is the transaction hash (not a signed tx).\n */\ntype SignedData = { signedData: string };\ntype BroadcastedTx = { txHash: string };\n\nexport type SigningResult = SignedData | BroadcastedTx;\n\nexport type ApprovalResponse =\n | {\n error: RpcError;\n }\n | SigningResult;\n\nexport type BatchApprovalResponse =\n | { error: RpcError }\n | {\n result: SignedData[];\n };\nexport interface ApprovalController {\n requestApproval: (params: ApprovalParams) => Promise<ApprovalResponse>;\n requestPublicKey: (params: RequestPublicKeyParams) => Promise<string>;\n onTransactionConfirmed: (txHash: Hex, requestId: string) => void;\n onTransactionReverted: (txHash: Hex, requestId: string) => void;\n}\n\nexport interface BatchApprovalController extends ApprovalController {\n requestBatchApproval: (params: BatchApprovalParams) => Promise<BatchApprovalResponse>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/account.ts"],"names":["WalletType"],"mappings":"AAEO,IAAKA,OAEVA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,WAAa,cACbA,EAAA,SAAW,WACXA,EAAA,SAAW,WANDA,OAAA","sourcesContent":["import type { Network, NetworkVMType } from './common';\n\nexport enum WalletType {\n // Primary wallet types\n Mnemonic = 'mnemonic',\n Ledger = 'ledger',\n LedgerLive = 'ledger-live',\n Keystone = 'keystone',\n Seedless = 'seedless',\n}\n\nexport type GetAddressParams = {\n walletType: WalletType;\n accountIndex: number;\n xpub: string;\n network?: Network;\n xpubXP?: string;\n};\n\nexport type GetAddressResponse = Record<string, string>;\n\nexport type SimpleDeriveAddressParams = {\n network: Omit<Network, 'tokens'>;\n /**\n * ID of the secret key to use for derivation.\n */\n secretId: string;\n};\nexport type DetailedDeriveAddressParams = SimpleDeriveAddressParams & {\n /**\n * Account index for which the public key is requested.\n * Leave empty if requesting a public key for a single-account private key.\n */\n accountIndex: number;\n /**\n * Type of the derivation path to use.\n * Useful when working with Ledger devices, which support BIP44 and Ledger Live derivation paths.\n */\n derivationPathType: DerivationPathType;\n};\n\nexport type DeriveAddressParams = SimpleDeriveAddressParams | DetailedDeriveAddressParams;\n\nexport type DeriveAddressResponse = Partial<Record<NetworkVMType, string>>;\n\nexport type DerivationPathType = 'bip44' | 'ledger_live';\nexport type BuildDerivationPathParams = { accountIndex: number; derivationPathType: DerivationPathType };\nexport type BuildDerivationPathResponse = Partial<Record<NetworkVMType, string>>;\n\nexport type PubKeyType = {\n evm: string;\n /**\n * Public keys used for X/P chain are from a different derivation path.\n */\n xp?: string;\n btcWalletPolicyDetails?: BtcWalletPolicyDetails;\n};\n\nexport type BtcWalletPolicyDetails = {\n hmacHex: string;\n /**\n * Extended public key of m/44'/60'/n\n */\n xpub: string;\n masterFingerprint: string;\n name: string;\n};\n"]}
|
package/dist/common.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkSAQJRAJ4_cjs = require('./chunk-SAQJRAJ4.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, 'AppName', {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkSAQJRAJ4_cjs.c; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, 'Environment', {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkSAQJRAJ4_cjs.b; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, 'NetworkVMType', {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkSAQJRAJ4_cjs.a; }
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=out.js.map
|
|
20
20
|
//# sourceMappingURL=common.cjs.map
|
package/dist/common.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { NetworkToken } from './token.cjs';
|
|
1
|
+
import { NetworkToken, NetworkContractToken } from './token.cjs';
|
|
2
2
|
|
|
3
3
|
type Network = {
|
|
4
4
|
isTestnet?: boolean;
|
|
5
5
|
chainId: number;
|
|
6
|
+
caipId?: string;
|
|
6
7
|
chainName: string;
|
|
7
8
|
rpcUrl: string;
|
|
8
9
|
utilityAddresses?: {
|
|
@@ -15,6 +16,7 @@ type Network = {
|
|
|
15
16
|
nativeTokenId?: string;
|
|
16
17
|
};
|
|
17
18
|
};
|
|
19
|
+
tokens?: NetworkContractToken[];
|
|
18
20
|
explorerUrl?: string;
|
|
19
21
|
logoUri?: string;
|
|
20
22
|
vmName: NetworkVMType;
|
|
@@ -26,7 +28,8 @@ declare enum NetworkVMType {
|
|
|
26
28
|
AVM = "AVM",
|
|
27
29
|
PVM = "PVM",
|
|
28
30
|
CoreEth = "CoreEth",
|
|
29
|
-
HVM = "HVM"
|
|
31
|
+
HVM = "HVM",
|
|
32
|
+
SVM = "SVM"
|
|
30
33
|
}
|
|
31
34
|
type Storage = {
|
|
32
35
|
get: <T>(id: string) => T | undefined;
|
package/dist/common.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { NetworkToken } from './token.js';
|
|
1
|
+
import { NetworkToken, NetworkContractToken } from './token.js';
|
|
2
2
|
|
|
3
3
|
type Network = {
|
|
4
4
|
isTestnet?: boolean;
|
|
5
5
|
chainId: number;
|
|
6
|
+
caipId?: string;
|
|
6
7
|
chainName: string;
|
|
7
8
|
rpcUrl: string;
|
|
8
9
|
utilityAddresses?: {
|
|
@@ -15,6 +16,7 @@ type Network = {
|
|
|
15
16
|
nativeTokenId?: string;
|
|
16
17
|
};
|
|
17
18
|
};
|
|
19
|
+
tokens?: NetworkContractToken[];
|
|
18
20
|
explorerUrl?: string;
|
|
19
21
|
logoUri?: string;
|
|
20
22
|
vmName: NetworkVMType;
|
|
@@ -26,7 +28,8 @@ declare enum NetworkVMType {
|
|
|
26
28
|
AVM = "AVM",
|
|
27
29
|
PVM = "PVM",
|
|
28
30
|
CoreEth = "CoreEth",
|
|
29
|
-
HVM = "HVM"
|
|
31
|
+
HVM = "HVM",
|
|
32
|
+
SVM = "SVM"
|
|
30
33
|
}
|
|
31
34
|
type Storage = {
|
|
32
35
|
get: <T>(id: string) => T | undefined;
|
package/dist/common.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
require('./chunk-AILYKQEY.cjs');
|
|
4
4
|
var chunkJUQZNXAX_cjs = require('./chunk-JUQZNXAX.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkVH6PRR45_cjs = require('./chunk-VH6PRR45.cjs');
|
|
6
6
|
var chunkPX3B6TJZ_cjs = require('./chunk-PX3B6TJZ.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkN7PCIGVW_cjs = require('./chunk-N7PCIGVW.cjs');
|
|
8
8
|
var chunkB6DAZDIA_cjs = require('./chunk-B6DAZDIA.cjs');
|
|
9
9
|
require('./chunk-47KTBBRA.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkY465KEXP_cjs = require('./chunk-Y465KEXP.cjs');
|
|
11
11
|
require('./chunk-JUV577XH.cjs');
|
|
12
12
|
var chunk4PGCXP4C_cjs = require('./chunk-4PGCXP4C.cjs');
|
|
13
13
|
require('./chunk-SYVNOFCV.cjs');
|
|
14
14
|
var chunkSYE3TX4L_cjs = require('./chunk-SYE3TX4L.cjs');
|
|
15
|
-
require('./chunk-
|
|
16
|
-
var
|
|
15
|
+
require('./chunk-YB5EN6FL.cjs');
|
|
16
|
+
var chunkSAQJRAJ4_cjs = require('./chunk-SAQJRAJ4.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -23,15 +23,15 @@ Object.defineProperty(exports, 'EventNames', {
|
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, 'AlertType', {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkVH6PRR45_cjs.c; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, 'DetailItemType', {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkVH6PRR45_cjs.b; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, 'RpcMethod', {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkVH6PRR45_cjs.a; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, 'TxType', {
|
|
37
37
|
enumerable: true,
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, 'TxType', {
|
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, 'TokenType', {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkN7PCIGVW_cjs.a; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, 'PChainTransactionType', {
|
|
45
45
|
enumerable: true,
|
|
@@ -55,7 +55,7 @@ Object.defineProperty(exports, 'XChainTransactionType', {
|
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, 'WalletType', {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkY465KEXP_cjs.a; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, 'RawSimplePriceResponseSchema', {
|
|
61
61
|
enumerable: true,
|
|
@@ -71,15 +71,15 @@ Object.defineProperty(exports, 'parseManifest', {
|
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, 'AppName', {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkSAQJRAJ4_cjs.c; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, 'Environment', {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkSAQJRAJ4_cjs.b; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, 'NetworkVMType', {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkSAQJRAJ4_cjs.a; }
|
|
83
83
|
});
|
|
84
84
|
//# sourceMappingURL=out.js.map
|
|
85
85
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
export { AppName, Caip2ChainId, Environment, Hex, Network, NetworkVMType, Storage } from './common.cjs';
|
|
2
2
|
export { RawSimplePriceResponse, RawSimplePriceResponseSchema, SimplePriceResponse, SimplePriceResponseSchema } from './coingecko.cjs';
|
|
3
|
-
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM } from './balance.cjs';
|
|
3
|
+
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM, TokenWithBalanceSPL, TokenWithBalanceSVM } from './balance.cjs';
|
|
4
4
|
export { Error } from './error.cjs';
|
|
5
5
|
export { Manifest, parseManifest } from './manifest.cjs';
|
|
6
6
|
export { AppInfo, ConstructorParams, Module, NetworkFeeParam } from './module.cjs';
|
|
7
7
|
export { NetworkFees, SuggestGasPriceOptionsResponse } from './network-fee.cjs';
|
|
8
|
-
export { A as AddressItem, p as Alert, o as AlertDetails, n as AlertType,
|
|
9
|
-
export { ERC1155Token, ERC20Token, ERC721Token, NONERCToken, NetworkContractToken, NetworkToken, TokenType } from './token.cjs';
|
|
8
|
+
export { A as AddressItem, p as Alert, o as AlertDetails, n as AlertType, I as ApprovalController, w as ApprovalParams, G as ApprovalResponse, K as BalanceChange, B as BaseDetailItem, J as BatchApprovalController, x as BatchApprovalParams, H as BatchApprovalResponse, q as BitcoinExecuteTxData, r as BitcoingSignTxData, u as BtcTxUpdateFn, C as CurrencyItem, D as DappInfo, i as DataItem, j as DateItem, l as DetailItem, g as DetailItemType, f as DetailSection, m as DisplayData, E as EvmTxBatchUpdateFn, t as EvmTxUpdateFn, F as FundsRecipientItem, k as LinkItem, L as LinkItemValue, M as MessageTypeProperty, d as MessageTypes, N as NodeIDItem, y as RequestPublicKeyParams, b as RpcError, R as RpcMethod, a as RpcRequest, c as RpcResponse, S as SigningData, s as SigningData_EthSendTx, v as SigningRequest, z as SigningResult, h as TextItem, Q as TokenApproval, U as TokenApprovals, O as TokenDiff, P as TokenDiffItem, V as TransactionSimulationResult, T as TypedData, e as TypedDataV1 } from './rpc-d3af2845.js';
|
|
9
|
+
export { ERC1155Token, ERC20Token, ERC721Token, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType } from './token.cjs';
|
|
10
10
|
export { GetTransactionHistory, PChainTransactionType, Transaction, TransactionHistoryResponse, TransactionType, TxToken, XChainTransactionType } from './transaction-history.cjs';
|
|
11
|
-
export { BtcWalletPolicyDetails, GetAddressParams, GetAddressResponse, PubKeyType, WalletType } from './account.cjs';
|
|
11
|
+
export { BtcWalletPolicyDetails, BuildDerivationPathParams, BuildDerivationPathResponse, DerivationPathType, DeriveAddressParams, DeriveAddressResponse, DetailedDeriveAddressParams, GetAddressParams, GetAddressResponse, PubKeyType, SimpleDeriveAddressParams, WalletType } from './account.cjs';
|
|
12
12
|
export { AddPermissionlessDelegatorTx, AddPermissionlessValidatorTx, AddSubnetValidatorTx, BaseTx, BlockchainDetails, ChainDetails, ConvertSubnetToL1Tx, CreateChainTx, CreateSubnetTx, DisableL1ValidatorTx, ExportImportTxDetails, ExportTx, FeeData, ImportTx, IncreaseL1ValidatorBalanceTx, L1Details, RegisterL1ValidatorTx, RemoveSubnetValidatorTx, SetL1ValidatorWeightTx, StakingDetails, SubnetDetails, TxBase, TxDetails, TxType, VM } from './staking.cjs';
|
|
13
13
|
export { AccountsChangedEventData, ChainAgnosticProvider, ChainChangedEventData, DomainMetadata, EIP6963ProviderDetail, EIP6963ProviderInfo, EventNames, JsonRpcRequestPayload, PartialBy, UnlockStateChangedEventData } from './provider.cjs';
|
|
14
14
|
import 'zod';
|
|
15
15
|
import '@avalabs/glacier-sdk';
|
|
16
16
|
import '@avalabs/core-wallets-sdk';
|
|
17
17
|
import 'hypersdk-client';
|
|
18
|
-
import '@solana/rpc';
|
|
19
18
|
import 'ethers';
|
|
20
19
|
import '@metamask/rpc-errors';
|
|
21
20
|
import 'events';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
export { AppName, Caip2ChainId, Environment, Hex, Network, NetworkVMType, Storage } from './common.js';
|
|
2
2
|
export { RawSimplePriceResponse, RawSimplePriceResponseSchema, SimplePriceResponse, SimplePriceResponseSchema } from './coingecko.js';
|
|
3
|
-
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM } from './balance.js';
|
|
3
|
+
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM, TokenWithBalanceSPL, TokenWithBalanceSVM } from './balance.js';
|
|
4
4
|
export { Error } from './error.js';
|
|
5
5
|
export { Manifest, parseManifest } from './manifest.js';
|
|
6
6
|
export { AppInfo, ConstructorParams, Module, NetworkFeeParam } from './module.js';
|
|
7
7
|
export { NetworkFees, SuggestGasPriceOptionsResponse } from './network-fee.js';
|
|
8
|
-
export { A as AddressItem, p as Alert, o as AlertDetails, n as AlertType,
|
|
9
|
-
export { ERC1155Token, ERC20Token, ERC721Token, NONERCToken, NetworkContractToken, NetworkToken, TokenType } from './token.js';
|
|
8
|
+
export { A as AddressItem, p as Alert, o as AlertDetails, n as AlertType, I as ApprovalController, w as ApprovalParams, G as ApprovalResponse, K as BalanceChange, B as BaseDetailItem, J as BatchApprovalController, x as BatchApprovalParams, H as BatchApprovalResponse, q as BitcoinExecuteTxData, r as BitcoingSignTxData, u as BtcTxUpdateFn, C as CurrencyItem, D as DappInfo, i as DataItem, j as DateItem, l as DetailItem, g as DetailItemType, f as DetailSection, m as DisplayData, E as EvmTxBatchUpdateFn, t as EvmTxUpdateFn, F as FundsRecipientItem, k as LinkItem, L as LinkItemValue, M as MessageTypeProperty, d as MessageTypes, N as NodeIDItem, y as RequestPublicKeyParams, b as RpcError, R as RpcMethod, a as RpcRequest, c as RpcResponse, S as SigningData, s as SigningData_EthSendTx, v as SigningRequest, z as SigningResult, h as TextItem, Q as TokenApproval, U as TokenApprovals, O as TokenDiff, P as TokenDiffItem, V as TransactionSimulationResult, T as TypedData, e as TypedDataV1 } from './rpc-e02a5305.js';
|
|
9
|
+
export { ERC1155Token, ERC20Token, ERC721Token, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType } from './token.js';
|
|
10
10
|
export { GetTransactionHistory, PChainTransactionType, Transaction, TransactionHistoryResponse, TransactionType, TxToken, XChainTransactionType } from './transaction-history.js';
|
|
11
|
-
export { BtcWalletPolicyDetails, GetAddressParams, GetAddressResponse, PubKeyType, WalletType } from './account.js';
|
|
11
|
+
export { BtcWalletPolicyDetails, BuildDerivationPathParams, BuildDerivationPathResponse, DerivationPathType, DeriveAddressParams, DeriveAddressResponse, DetailedDeriveAddressParams, GetAddressParams, GetAddressResponse, PubKeyType, SimpleDeriveAddressParams, WalletType } from './account.js';
|
|
12
12
|
export { AddPermissionlessDelegatorTx, AddPermissionlessValidatorTx, AddSubnetValidatorTx, BaseTx, BlockchainDetails, ChainDetails, ConvertSubnetToL1Tx, CreateChainTx, CreateSubnetTx, DisableL1ValidatorTx, ExportImportTxDetails, ExportTx, FeeData, ImportTx, IncreaseL1ValidatorBalanceTx, L1Details, RegisterL1ValidatorTx, RemoveSubnetValidatorTx, SetL1ValidatorWeightTx, StakingDetails, SubnetDetails, TxBase, TxDetails, TxType, VM } from './staking.js';
|
|
13
13
|
export { AccountsChangedEventData, ChainAgnosticProvider, ChainChangedEventData, DomainMetadata, EIP6963ProviderDetail, EIP6963ProviderInfo, EventNames, JsonRpcRequestPayload, PartialBy, UnlockStateChangedEventData } from './provider.js';
|
|
14
14
|
import 'zod';
|
|
15
15
|
import '@avalabs/glacier-sdk';
|
|
16
16
|
import '@avalabs/core-wallets-sdk';
|
|
17
17
|
import 'hypersdk-client';
|
|
18
|
-
import '@solana/rpc';
|
|
19
18
|
import 'ethers';
|
|
20
19
|
import '@metamask/rpc-errors';
|
|
21
20
|
import 'events';
|