@avalabs/vm-module-types 3.11.0 → 3.12.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.
- package/dist/balance.d.cts +13 -2
- package/dist/balance.d.ts +13 -2
- package/dist/{chunk-V2MZKRLY.js → chunk-4NLGTKVT.js} +1 -1
- package/dist/chunk-4NLGTKVT.js.map +1 -0
- package/dist/{chunk-YLE2VFJX.cjs → chunk-DTK5YHAN.cjs} +1 -1
- package/dist/chunk-DTK5YHAN.cjs.map +1 -0
- package/dist/chunk-EC2O5ECQ.cjs +7 -0
- package/dist/chunk-EC2O5ECQ.cjs.map +1 -0
- package/dist/chunk-GNNCJP76.js +5 -0
- package/dist/chunk-GNNCJP76.js.map +1 -0
- package/dist/chunk-LWQ2662W.js +5 -0
- package/dist/chunk-LWQ2662W.js.map +1 -0
- package/dist/chunk-PJJJC3TC.cjs +9 -0
- package/dist/chunk-PJJJC3TC.cjs.map +1 -0
- package/dist/common.cjs +4 -4
- package/dist/common.d.cts +2 -1
- package/dist/common.d.ts +2 -1
- package/dist/common.js +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/module.cjs +1 -1
- package/dist/module.d.cts +2 -2
- package/dist/module.d.ts +2 -2
- package/dist/module.js +1 -1
- package/dist/token.cjs +2 -2
- package/dist/token.d.cts +17 -2
- package/dist/token.d.ts +17 -2
- package/dist/token.js +1 -1
- package/dist/transaction-history.cjs +4 -4
- package/dist/transaction-history.d.cts +5 -0
- package/dist/transaction-history.d.ts +5 -0
- package/dist/transaction-history.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-EWK3W2OZ.js +0 -5
- package/dist/chunk-EWK3W2OZ.js.map +0 -1
- package/dist/chunk-GMF7R4KJ.js +0 -5
- package/dist/chunk-GMF7R4KJ.js.map +0 -1
- package/dist/chunk-N7PCIGVW.cjs +0 -7
- package/dist/chunk-N7PCIGVW.cjs.map +0 -1
- package/dist/chunk-SNPLCK6A.cjs +0 -9
- package/dist/chunk-SNPLCK6A.cjs.map +0 -1
- package/dist/chunk-V2MZKRLY.js.map +0 -1
- package/dist/chunk-YLE2VFJX.cjs.map +0 -1
package/dist/balance.d.cts
CHANGED
|
@@ -59,6 +59,17 @@ type TokenWithBalanceSPL = TokenBalanceDataWithDecimals & TokenMarketData & {
|
|
|
59
59
|
logoUri?: string;
|
|
60
60
|
reputation: null;
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* HyperCore spot TokenWithBalance. Identity is spot `index`, not an EVM address.
|
|
64
|
+
*/
|
|
65
|
+
type TokenWithBalanceHypercoreSpot = TokenBalanceDataWithDecimals & TokenMarketData & {
|
|
66
|
+
type: TokenType.HYPERCORE_SPOT;
|
|
67
|
+
index: number;
|
|
68
|
+
logoUri?: string;
|
|
69
|
+
reputation: null;
|
|
70
|
+
/** Optional HyperEVM bridge contract when the spot asset is bridged. */
|
|
71
|
+
evmContract?: string;
|
|
72
|
+
};
|
|
62
73
|
type TokenWithBalanceEVM = NetworkTokenWithBalance | TokenWithBalanceERC20 | NftTokenWithBalance;
|
|
63
74
|
/**
|
|
64
75
|
* Bitcoin TokenWithBalance interface.
|
|
@@ -151,7 +162,7 @@ interface TokenAttribute {
|
|
|
151
162
|
name: string;
|
|
152
163
|
value: string;
|
|
153
164
|
}
|
|
154
|
-
type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM | TokenWithBalanceSVM | TokenWithBalanceSPL;
|
|
165
|
+
type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM | TokenWithBalanceSVM | TokenWithBalanceSPL | TokenWithBalanceHypercoreSpot;
|
|
155
166
|
type GetBalancesResponse = Record<string, Record<string, TokenWithBalance | Error> | Error>;
|
|
156
167
|
|
|
157
|
-
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM, TokenWithBalanceSPL, TokenWithBalanceSVM };
|
|
168
|
+
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalanceHypercoreSpot, TokenWithBalancePVM, TokenWithBalanceSPL, TokenWithBalanceSVM };
|
package/dist/balance.d.ts
CHANGED
|
@@ -59,6 +59,17 @@ type TokenWithBalanceSPL = TokenBalanceDataWithDecimals & TokenMarketData & {
|
|
|
59
59
|
logoUri?: string;
|
|
60
60
|
reputation: null;
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* HyperCore spot TokenWithBalance. Identity is spot `index`, not an EVM address.
|
|
64
|
+
*/
|
|
65
|
+
type TokenWithBalanceHypercoreSpot = TokenBalanceDataWithDecimals & TokenMarketData & {
|
|
66
|
+
type: TokenType.HYPERCORE_SPOT;
|
|
67
|
+
index: number;
|
|
68
|
+
logoUri?: string;
|
|
69
|
+
reputation: null;
|
|
70
|
+
/** Optional HyperEVM bridge contract when the spot asset is bridged. */
|
|
71
|
+
evmContract?: string;
|
|
72
|
+
};
|
|
62
73
|
type TokenWithBalanceEVM = NetworkTokenWithBalance | TokenWithBalanceERC20 | NftTokenWithBalance;
|
|
63
74
|
/**
|
|
64
75
|
* Bitcoin TokenWithBalance interface.
|
|
@@ -151,7 +162,7 @@ interface TokenAttribute {
|
|
|
151
162
|
name: string;
|
|
152
163
|
value: string;
|
|
153
164
|
}
|
|
154
|
-
type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM | TokenWithBalanceSVM | TokenWithBalanceSPL;
|
|
165
|
+
type TokenWithBalance = TokenWithBalanceEVM | TokenWithBalanceBTC | TokenWithBalancePVM | TokenWithBalanceAVM | TokenWithBalanceSVM | TokenWithBalanceSPL | TokenWithBalanceHypercoreSpot;
|
|
155
166
|
type GetBalancesResponse = Record<string, Record<string, TokenWithBalance | Error> | Error>;
|
|
156
167
|
|
|
157
|
-
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalancePVM, TokenWithBalanceSPL, TokenWithBalanceSVM };
|
|
168
|
+
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalanceHypercoreSpot, TokenWithBalancePVM, TokenWithBalanceSPL, TokenWithBalanceSVM };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/transaction-history.ts"],"names":["TransactionType","PChainTransactionType","XChainTransactionType"],"mappings":"AAoFO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,QAAU,SACVA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,UACXA,EAAA,YAAc,aACdA,EAAA,QAAU,UACVA,EAAA,WAAa,YACbA,EAAA,OAAS,SACTA,EAAA,QAAU,UAbAA,OAAA,IAgBAC,OACVA,EAAA,iBAAmB,iBACnBA,EAAA,wBAA0B,uBAC1BA,EAAA,iBAAmB,iBACnBA,EAAA,gBAAkB,gBAClBA,EAAA,iBAAmB,iBACnBA,EAAA,UAAY,WACZA,EAAA,UAAY,WACZA,EAAA,gBAAkB,gBAClBA,EAAA,oBAAsB,oBACtBA,EAAA,2BAA6B,0BAC7BA,EAAA,oBAAsB,oBACtBA,EAAA,gCAAkC,+BAClCA,EAAA,gCAAkC,+BAClCA,EAAA,QAAU,SACVA,EAAA,6BAA+B,4BAC/BA,EAAA,QAAU,UAhBAA,OAAA,IAmBAC,OACVA,EAAA,QAAU,SACVA,EAAA,gBAAkB,gBAClBA,EAAA,aAAe,cACfA,EAAA,UAAY,WACZA,EAAA,UAAY,WACZA,EAAA,QAAU,UANAA,OAAA","sourcesContent":["import type { Network } from './common';\nimport type { TokenType } from './token';\n\nexport type GetTransactionHistory = {\n network: Network;\n address: string;\n nextPageToken?: string;\n offset?: number;\n};\n\nexport type TransactionHistoryResponse = {\n transactions: Transaction[];\n nextPageToken?: string;\n};\n\nexport type Transaction = {\n isContractCall: boolean;\n isIncoming: boolean;\n isOutgoing: boolean;\n isSender: boolean;\n timestamp: number;\n hash: string;\n from: string;\n to: string;\n tokens: TxToken[];\n gasPrice?: string;\n gasUsed: string;\n txType?: TransactionType | PChainTransactionType | XChainTransactionType | 'CreateAssetTx' | 'OperationTx';\n chainId: string; // chainId from ActiveNetwork used to fetch tx\n method?: string;\n explorerLink: string;\n};\n\nexport type TxToken = {\n decimal?: string;\n name: string;\n symbol: string;\n amount: string;\n imageUri?: string;\n from?: TokenWithAddress;\n to?: TokenWithAddress;\n collectableTokenId?: string;\n type: TokenType;\n} & (\n | {\n address: string;\n type: TokenType.ERC20 | TokenType.ERC721 | TokenType.ERC1155 | TokenType.NONERC | TokenType.SPL;\n }\n | {\n type: TokenType.NATIVE;\n }\n | {\n type: TokenType.HYPERCORE_SPOT;\n index: number;\n /** Optional HyperEVM bridge contract when the spot asset is bridged. */\n evmContract?: string;\n }\n);\n\n// this is RichAddress from @avalabs/glacier-sdk,\n// rename it to TokenWithAddress for better understanding\ntype TokenWithAddress = {\n /**\n * The contract name.\n */\n name?: string;\n /**\n * The contract symbol.\n */\n symbol?: string;\n /**\n * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.\n */\n decimals?: number;\n /**\n * The logo uri for the address.\n */\n logoUri?: string;\n /**\n * A wallet or contract address in mixed-case checksum encoding.\n */\n address: string;\n};\n\nexport enum TransactionType {\n BRIDGE = 'Bridge',\n SWAP = 'Swap',\n SEND = 'Send',\n RECEIVE = 'Receive',\n NFT_BUY = 'NFTBuy',\n APPROVE = 'Approve',\n TRANSFER = 'Transfer',\n NFT_SEND = 'NFTSend',\n NFT_RECEIVE = 'NFTReceive',\n AIRDROP = 'Airdrop',\n FILL_ORDER = 'FillOrder',\n UNWRAP = 'Unwrap',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum PChainTransactionType {\n ADD_VALIDATOR_TX = 'AddValidatorTx',\n ADD_SUBNET_VALIDATOR_TX = 'AddSubnetValidatorTx',\n ADD_DELEGATOR_TX = 'AddDelegatorTx',\n CREATE_CHAIN_TX = 'CreateChainTx',\n CREATE_SUBNET_TX = 'CreateSubnetTx',\n IMPORT_TX = 'ImportTx',\n EXPORT_TX = 'ExportTx',\n ADVANCE_TIME_TX = 'AdvanceTimeTx',\n REWARD_VALIDATOR_TX = 'RewardValidatorTx',\n REMOVE_SUBNET_VALIDATOR_TX = 'RemoveSubnetValidatorTx',\n TRANSFORM_SUBNET_TX = 'TransformSubnetTx',\n ADD_PERMISSIONLESS_VALIDATOR_TX = 'AddPermissionlessValidatorTx',\n ADD_PERMISSIONLESS_DELEGATOR_TX = 'AddPermissionlessDelegatorTx',\n BASE_TX = 'BaseTx',\n TRANSFER_SUBNET_OWNERSHIP_TX = 'TransferSubnetOwnershipTx',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum XChainTransactionType {\n BASE_TX = 'BaseTx',\n CREATE_ASSET_TX = 'CreateAssetTx',\n OPERATION_TX = 'OperationTx',\n IMPORT_TX = 'ImportTx',\n EXPORT_TX = 'ExportTx',\n UNKNOWN = 'UNKNOWN',\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/transaction-history.ts"],"names":["TransactionType","PChainTransactionType","XChainTransactionType"],"mappings":"AAoFO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,QAAU,SACVA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,UACXA,EAAA,YAAc,aACdA,EAAA,QAAU,UACVA,EAAA,WAAa,YACbA,EAAA,OAAS,SACTA,EAAA,QAAU,UAbAA,OAAA,IAgBAC,OACVA,EAAA,iBAAmB,iBACnBA,EAAA,wBAA0B,uBAC1BA,EAAA,iBAAmB,iBACnBA,EAAA,gBAAkB,gBAClBA,EAAA,iBAAmB,iBACnBA,EAAA,UAAY,WACZA,EAAA,UAAY,WACZA,EAAA,gBAAkB,gBAClBA,EAAA,oBAAsB,oBACtBA,EAAA,2BAA6B,0BAC7BA,EAAA,oBAAsB,oBACtBA,EAAA,gCAAkC,+BAClCA,EAAA,gCAAkC,+BAClCA,EAAA,QAAU,SACVA,EAAA,6BAA+B,4BAC/BA,EAAA,QAAU,UAhBAA,OAAA,IAmBAC,OACVA,EAAA,QAAU,SACVA,EAAA,gBAAkB,gBAClBA,EAAA,aAAe,cACfA,EAAA,UAAY,WACZA,EAAA,UAAY,WACZA,EAAA,QAAU,UANAA,OAAA","sourcesContent":["import type { Network } from './common';\nimport type { TokenType } from './token';\n\nexport type GetTransactionHistory = {\n network: Network;\n address: string;\n nextPageToken?: string;\n offset?: number;\n};\n\nexport type TransactionHistoryResponse = {\n transactions: Transaction[];\n nextPageToken?: string;\n};\n\nexport type Transaction = {\n isContractCall: boolean;\n isIncoming: boolean;\n isOutgoing: boolean;\n isSender: boolean;\n timestamp: number;\n hash: string;\n from: string;\n to: string;\n tokens: TxToken[];\n gasPrice?: string;\n gasUsed: string;\n txType?: TransactionType | PChainTransactionType | XChainTransactionType | 'CreateAssetTx' | 'OperationTx';\n chainId: string; // chainId from ActiveNetwork used to fetch tx\n method?: string;\n explorerLink: string;\n};\n\nexport type TxToken = {\n decimal?: string;\n name: string;\n symbol: string;\n amount: string;\n imageUri?: string;\n from?: TokenWithAddress;\n to?: TokenWithAddress;\n collectableTokenId?: string;\n type: TokenType;\n} & (\n | {\n address: string;\n type: TokenType.ERC20 | TokenType.ERC721 | TokenType.ERC1155 | TokenType.NONERC | TokenType.SPL;\n }\n | {\n type: TokenType.NATIVE;\n }\n | {\n type: TokenType.HYPERCORE_SPOT;\n index: number;\n /** Optional HyperEVM bridge contract when the spot asset is bridged. */\n evmContract?: string;\n }\n);\n\n// this is RichAddress from @avalabs/glacier-sdk,\n// rename it to TokenWithAddress for better understanding\ntype TokenWithAddress = {\n /**\n * The contract name.\n */\n name?: string;\n /**\n * The contract symbol.\n */\n symbol?: string;\n /**\n * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.\n */\n decimals?: number;\n /**\n * The logo uri for the address.\n */\n logoUri?: string;\n /**\n * A wallet or contract address in mixed-case checksum encoding.\n */\n address: string;\n};\n\nexport enum TransactionType {\n BRIDGE = 'Bridge',\n SWAP = 'Swap',\n SEND = 'Send',\n RECEIVE = 'Receive',\n NFT_BUY = 'NFTBuy',\n APPROVE = 'Approve',\n TRANSFER = 'Transfer',\n NFT_SEND = 'NFTSend',\n NFT_RECEIVE = 'NFTReceive',\n AIRDROP = 'Airdrop',\n FILL_ORDER = 'FillOrder',\n UNWRAP = 'Unwrap',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum PChainTransactionType {\n ADD_VALIDATOR_TX = 'AddValidatorTx',\n ADD_SUBNET_VALIDATOR_TX = 'AddSubnetValidatorTx',\n ADD_DELEGATOR_TX = 'AddDelegatorTx',\n CREATE_CHAIN_TX = 'CreateChainTx',\n CREATE_SUBNET_TX = 'CreateSubnetTx',\n IMPORT_TX = 'ImportTx',\n EXPORT_TX = 'ExportTx',\n ADVANCE_TIME_TX = 'AdvanceTimeTx',\n REWARD_VALIDATOR_TX = 'RewardValidatorTx',\n REMOVE_SUBNET_VALIDATOR_TX = 'RemoveSubnetValidatorTx',\n TRANSFORM_SUBNET_TX = 'TransformSubnetTx',\n ADD_PERMISSIONLESS_VALIDATOR_TX = 'AddPermissionlessValidatorTx',\n ADD_PERMISSIONLESS_DELEGATOR_TX = 'AddPermissionlessDelegatorTx',\n BASE_TX = 'BaseTx',\n TRANSFER_SUBNET_OWNERSHIP_TX = 'TransferSubnetOwnershipTx',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum XChainTransactionType {\n BASE_TX = 'BaseTx',\n CREATE_ASSET_TX = 'CreateAssetTx',\n OPERATION_TX = 'OperationTx',\n IMPORT_TX = 'ImportTx',\n EXPORT_TX = 'ExportTx',\n UNKNOWN = 'UNKNOWN',\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var e=(r=>(r.NATIVE="NATIVE",r.ERC20="ERC20",r.ERC721="ERC721",r.ERC1155="ERC1155",r.NONERC="NONERC",r.SPL="SPL",r.HYPERCORE_SPOT="HYPERCORE_SPOT",r))(e||{});
|
|
4
|
+
|
|
5
|
+
exports.a = e;
|
|
6
|
+
//# sourceMappingURL=out.js.map
|
|
7
|
+
//# sourceMappingURL=chunk-EC2O5ECQ.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,MACNA,EAAA,eAAiB,iBAPPA,OAAA","sourcesContent":["export enum TokenType {\n NATIVE = 'NATIVE',\n ERC20 = 'ERC20',\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n NONERC = 'NONERC',\n SPL = 'SPL',\n HYPERCORE_SPOT = 'HYPERCORE_SPOT',\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\n/**\n * HyperCore spot token. Identity is the Hyperliquid spot `index`, not an EVM\n * contract. `evmContract` is present only when the asset is bridged to HyperEVM.\n */\nexport interface HypercoreSpotToken {\n type: TokenType.HYPERCORE_SPOT;\n index: number;\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n /** Optional HyperEVM bridge contract; not required for HyperCore-only spot. */\n evmContract?: string;\n}\n"]}
|
|
@@ -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,MACNA,EAAA,eAAiB,iBAPPA,OAAA","sourcesContent":["export enum TokenType {\n NATIVE = 'NATIVE',\n ERC20 = 'ERC20',\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n NONERC = 'NONERC',\n SPL = 'SPL',\n HYPERCORE_SPOT = 'HYPERCORE_SPOT',\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\n/**\n * HyperCore spot token. Identity is the Hyperliquid spot `index`, not an EVM\n * contract. `evmContract` is present only when the asset is bridged to HyperEVM.\n */\nexport interface HypercoreSpotToken {\n type: TokenType.HYPERCORE_SPOT;\n index: number;\n name: string;\n symbol: string;\n decimals: number;\n logoUri?: string;\n /** Optional HyperEVM bridge contract; not required for HyperCore-only spot. */\n evmContract?: 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.HYPERCORE="HYPERCORE",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-LWQ2662W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common.ts"],"names":["NetworkVMType","Environment","AppName"],"mappings":"AA2BO,IAAKA,OACVA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,UAAY,YARFA,OAAA,IAoBAC,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 isDevnet?: boolean;\n chainId: number;\n caipId?: string;\n chainName: string;\n rpcUrl: string;\n customRpcHeaders?: Record<string, 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 HYPERCORE = 'HYPERCORE',\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"]}
|
|
@@ -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.HYPERCORE="HYPERCORE",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-PJJJC3TC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common.ts"],"names":["NetworkVMType","Environment","AppName"],"mappings":"AA2BO,IAAKA,OACVA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,QAAU,UACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,UAAY,YARFA,OAAA,IAoBAC,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 isDevnet?: boolean;\n chainId: number;\n caipId?: string;\n chainName: string;\n rpcUrl: string;\n customRpcHeaders?: Record<string, 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 HYPERCORE = 'HYPERCORE',\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"]}
|
package/dist/common.cjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPJJJC3TC_cjs = require('./chunk-PJJJC3TC.cjs');
|
|
4
4
|
require('./chunk-IQLAM2UJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, 'AppName', {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkPJJJC3TC_cjs.c; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, 'Environment', {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkPJJJC3TC_cjs.b; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, 'NetworkVMType', {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkPJJJC3TC_cjs.a; }
|
|
19
19
|
});
|
|
20
20
|
//# sourceMappingURL=out.js.map
|
|
21
21
|
//# sourceMappingURL=common.cjs.map
|
package/dist/common.d.cts
CHANGED
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as AppName, b as Environment, a as NetworkVMType } from './chunk-
|
|
1
|
+
export { c as AppName, b as Environment, a as NetworkVMType } from './chunk-LWQ2662W.js';
|
|
2
2
|
import './chunk-DYCPFO4Y.js';
|
|
3
3
|
//# sourceMappingURL=out.js.map
|
|
4
4
|
//# sourceMappingURL=common.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -5,14 +5,14 @@ require('./chunk-AILYKQEY.cjs');
|
|
|
5
5
|
var chunk4NMX4VK7_cjs = require('./chunk-4NMX4VK7.cjs');
|
|
6
6
|
var chunkD3RUEILB_cjs = require('./chunk-D3RUEILB.cjs');
|
|
7
7
|
var chunkUYEUO5B3_cjs = require('./chunk-UYEUO5B3.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var chunkEC2O5ECQ_cjs = require('./chunk-EC2O5ECQ.cjs');
|
|
9
|
+
var chunkDTK5YHAN_cjs = require('./chunk-DTK5YHAN.cjs');
|
|
10
10
|
require('./chunk-47KTBBRA.cjs');
|
|
11
11
|
var chunkMI34CGL2_cjs = require('./chunk-MI34CGL2.cjs');
|
|
12
12
|
require('./chunk-UOMAJFBQ.cjs');
|
|
13
13
|
require('./chunk-JUV577XH.cjs');
|
|
14
14
|
var chunk4PGCXP4C_cjs = require('./chunk-4PGCXP4C.cjs');
|
|
15
|
-
var
|
|
15
|
+
var chunkPJJJC3TC_cjs = require('./chunk-PJJJC3TC.cjs');
|
|
16
16
|
require('./chunk-SYVNOFCV.cjs');
|
|
17
17
|
var chunkQU4TRHXG_cjs = require('./chunk-QU4TRHXG.cjs');
|
|
18
18
|
require('./chunk-IQLAM2UJ.cjs');
|
|
@@ -41,19 +41,19 @@ Object.defineProperty(exports, 'TxType', {
|
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, 'TokenType', {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkEC2O5ECQ_cjs.a; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, 'PChainTransactionType', {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkDTK5YHAN_cjs.b; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, 'TransactionType', {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkDTK5YHAN_cjs.a; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, 'XChainTransactionType', {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkDTK5YHAN_cjs.c; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, 'WalletType', {
|
|
59
59
|
enumerable: true,
|
|
@@ -69,15 +69,15 @@ Object.defineProperty(exports, 'SimplePriceResponseSchema', {
|
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, 'AppName', {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkPJJJC3TC_cjs.c; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, 'Environment', {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkPJJJC3TC_cjs.b; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, 'NetworkVMType', {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkPJJJC3TC_cjs.a; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, 'parseManifest', {
|
|
83
83
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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, TokenWithBalanceSPL, TokenWithBalanceSVM } from './balance.cjs';
|
|
3
|
+
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalanceHypercoreSpot, 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, RuntimeParams } from './module.cjs';
|
|
7
7
|
export { NetworkFees, SuggestGasPriceOptionsResponse } from './network-fee.cjs';
|
|
8
8
|
export { A as AddressItem, i as AddressListItem, s as Alert, r as AlertDetails, q as AlertType, O as ApprovalController, z as ApprovalParams, J as ApprovalResponse, Q as BalanceChange, B as BaseDetailItem, P as BatchApprovalController, G as BatchApprovalParams, K as BatchApprovalResponse, t as BitcoinExecuteTxData, u as BitcoingSignTxData, x as BtcTxUpdateFn, C as CurrencyItem, D as DappInfo, j as DataItem, k as DateItem, o as DetailItem, g as DetailItemType, f as DetailSection, p as DisplayData, E as EvmTxBatchUpdateFn, w as EvmTxUpdateFn, F as FundsRecipientItem, l as LinkItem, L as LinkItemValue, M as MessageTypeProperty, d as MessageTypes, n as NetworkItem, m as NetworkItemValue, N as NodeIDItem, H as RequestPublicKeyParams, b as RpcError, R as RpcMethod, a as RpcRequest, c as RpcResponse, S as SigningData, v as SigningData_EthSendTx, y as SigningRequest, I as SigningResult, h as TextItem, W as TokenApproval, X as TokenApprovals, U as TokenDiff, V as TokenDiffItem, Y as TransactionSimulationResult, T as TypedData, e as TypedDataV1 } from './rpc-4c41534b.js';
|
|
9
|
-
export { ERC1155Token, ERC20Token, ERC721Token, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType } from './token.cjs';
|
|
9
|
+
export { ERC1155Token, ERC20Token, ERC721Token, HypercoreSpotToken, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType } from './token.cjs';
|
|
10
10
|
export { GetTransactionHistory, PChainTransactionType, Transaction, TransactionHistoryResponse, TransactionType, TxToken, XChainTransactionType } from './transaction-history.cjs';
|
|
11
11
|
export { BtcWalletPolicyDetails, BuildDerivationPathParams, BuildDerivationPathResponse, DerivationPathType, DeriveAddressParams, DeriveAddressResponse, DeriveAddressesParams, DeriveAddressesResponse, DetailedDeriveAddressParams, GetAddressParams, GetAddressResponse, PubKeyType, SimpleDeriveAddressParams, WalletType } from './account.cjs';
|
|
12
12
|
export { AddAutoRenewedValidatorTx, AddPermissionlessDelegatorTx, AddPermissionlessValidatorTx, AddSubnetValidatorTx, BaseTx, BlockchainDetails, ChainDetails, ConvertSubnetToL1Tx, CreateChainTx, CreateSubnetTx, DisableL1ValidatorTx, ExportImportTxDetails, ExportTx, FeeData, ImportTx, IncreaseL1ValidatorBalanceTx, L1Details, RegisterL1ValidatorTx, RemoveSubnetValidatorTx, SetAutoRenewedValidatorConfigTx, SetL1ValidatorWeightTx, StakingDetails, SubnetDetails, TxBase, TxDetails, TxType, VM } from './staking.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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, TokenWithBalanceSPL, TokenWithBalanceSVM } from './balance.js';
|
|
3
|
+
export { GetBalancesParams, GetBalancesResponse, NetworkTokenWithBalance, NftTokenWithBalance, TokenAttribute, TokenBalanceData, TokenMarketData, TokenWithBalance, TokenWithBalanceAVM, TokenWithBalanceBTC, TokenWithBalanceERC20, TokenWithBalanceEVM, TokenWithBalanceHypercoreSpot, 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, RuntimeParams } from './module.js';
|
|
7
7
|
export { NetworkFees, SuggestGasPriceOptionsResponse } from './network-fee.js';
|
|
8
8
|
export { A as AddressItem, i as AddressListItem, s as Alert, r as AlertDetails, q as AlertType, O as ApprovalController, z as ApprovalParams, J as ApprovalResponse, Q as BalanceChange, B as BaseDetailItem, P as BatchApprovalController, G as BatchApprovalParams, K as BatchApprovalResponse, t as BitcoinExecuteTxData, u as BitcoingSignTxData, x as BtcTxUpdateFn, C as CurrencyItem, D as DappInfo, j as DataItem, k as DateItem, o as DetailItem, g as DetailItemType, f as DetailSection, p as DisplayData, E as EvmTxBatchUpdateFn, w as EvmTxUpdateFn, F as FundsRecipientItem, l as LinkItem, L as LinkItemValue, M as MessageTypeProperty, d as MessageTypes, n as NetworkItem, m as NetworkItemValue, N as NodeIDItem, H as RequestPublicKeyParams, b as RpcError, R as RpcMethod, a as RpcRequest, c as RpcResponse, S as SigningData, v as SigningData_EthSendTx, y as SigningRequest, I as SigningResult, h as TextItem, W as TokenApproval, X as TokenApprovals, U as TokenDiff, V as TokenDiffItem, Y as TransactionSimulationResult, T as TypedData, e as TypedDataV1 } from './rpc-62d97c17.js';
|
|
9
|
-
export { ERC1155Token, ERC20Token, ERC721Token, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType } from './token.js';
|
|
9
|
+
export { ERC1155Token, ERC20Token, ERC721Token, HypercoreSpotToken, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType } from './token.js';
|
|
10
10
|
export { GetTransactionHistory, PChainTransactionType, Transaction, TransactionHistoryResponse, TransactionType, TxToken, XChainTransactionType } from './transaction-history.js';
|
|
11
11
|
export { BtcWalletPolicyDetails, BuildDerivationPathParams, BuildDerivationPathResponse, DerivationPathType, DeriveAddressParams, DeriveAddressResponse, DeriveAddressesParams, DeriveAddressesResponse, DetailedDeriveAddressParams, GetAddressParams, GetAddressResponse, PubKeyType, SimpleDeriveAddressParams, WalletType } from './account.js';
|
|
12
12
|
export { AddAutoRenewedValidatorTx, AddPermissionlessDelegatorTx, AddPermissionlessValidatorTx, AddSubnetValidatorTx, BaseTx, BlockchainDetails, ChainDetails, ConvertSubnetToL1Tx, CreateChainTx, CreateSubnetTx, DisableL1ValidatorTx, ExportImportTxDetails, ExportTx, FeeData, ImportTx, IncreaseL1ValidatorBalanceTx, L1Details, RegisterL1ValidatorTx, RemoveSubnetValidatorTx, SetAutoRenewedValidatorConfigTx, SetL1ValidatorWeightTx, StakingDetails, SubnetDetails, TxBase, TxDetails, TxType, VM } from './staking.js';
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,14 @@ import './chunk-7U2R34EQ.js';
|
|
|
3
3
|
export { a as EventNames } from './chunk-6ZLXXGIV.js';
|
|
4
4
|
export { c as AlertType, b as DetailItemType, a as RpcMethod } from './chunk-NV2X67GI.js';
|
|
5
5
|
export { a as TxType } from './chunk-KPOQBGHJ.js';
|
|
6
|
-
export { a as TokenType } from './chunk-
|
|
7
|
-
export { b as PChainTransactionType, a as TransactionType, c as XChainTransactionType } from './chunk-
|
|
6
|
+
export { a as TokenType } from './chunk-GNNCJP76.js';
|
|
7
|
+
export { b as PChainTransactionType, a as TransactionType, c as XChainTransactionType } from './chunk-4NLGTKVT.js';
|
|
8
8
|
import './chunk-P6AM7I3B.js';
|
|
9
9
|
export { a as WalletType } from './chunk-QDQCGSSS.js';
|
|
10
10
|
import './chunk-Y76PR4XJ.js';
|
|
11
11
|
import './chunk-BHB5UV3J.js';
|
|
12
12
|
export { b as RawSimplePriceResponseSchema, a as SimplePriceResponseSchema } from './chunk-WOO6UGSQ.js';
|
|
13
|
-
export { c as AppName, b as Environment, a as NetworkVMType } from './chunk-
|
|
13
|
+
export { c as AppName, b as Environment, a as NetworkVMType } from './chunk-LWQ2662W.js';
|
|
14
14
|
import './chunk-REHORWPH.js';
|
|
15
15
|
export { a as parseManifest } from './chunk-AV7F5SDR.js';
|
|
16
16
|
import './chunk-DYCPFO4Y.js';
|
package/dist/module.cjs
CHANGED
package/dist/module.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { AppName, Environment, Network } from './common.cjs';
|
|
|
5
5
|
import { Manifest } from './manifest.cjs';
|
|
6
6
|
import { NetworkFees } from './network-fee.cjs';
|
|
7
7
|
import { O as ApprovalController, a as RpcRequest, c as RpcResponse } from './rpc-4c41534b.js';
|
|
8
|
-
import { NetworkContractToken } from './token.cjs';
|
|
8
|
+
import { NetworkContractToken, HypercoreSpotToken } from './token.cjs';
|
|
9
9
|
import { GetTransactionHistory, TransactionHistoryResponse } from './transaction-history.cjs';
|
|
10
10
|
import { HyperSDKClient } from 'hypersdk-client';
|
|
11
11
|
import { Agent } from 'http';
|
|
@@ -45,7 +45,7 @@ interface Module {
|
|
|
45
45
|
deriveAddress: (params: DeriveAddressParams) => Promise<DeriveAddressResponse>;
|
|
46
46
|
deriveAddresses: (params: DeriveAddressesParams) => Promise<DeriveAddressesResponse>;
|
|
47
47
|
buildDerivationPath: (params: BuildDerivationPathParams) => BuildDerivationPathResponse;
|
|
48
|
-
getTokens: (network: Network) => Promise<NetworkContractToken[]>;
|
|
48
|
+
getTokens: (network: Network) => Promise<(NetworkContractToken | HypercoreSpotToken)[]>;
|
|
49
49
|
onRpcRequest: (request: RpcRequest, chain: Network) => Promise<RpcResponse>;
|
|
50
50
|
}
|
|
51
51
|
|
package/dist/module.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { AppName, Environment, Network } from './common.js';
|
|
|
5
5
|
import { Manifest } from './manifest.js';
|
|
6
6
|
import { NetworkFees } from './network-fee.js';
|
|
7
7
|
import { O as ApprovalController, a as RpcRequest, c as RpcResponse } from './rpc-62d97c17.js';
|
|
8
|
-
import { NetworkContractToken } from './token.js';
|
|
8
|
+
import { NetworkContractToken, HypercoreSpotToken } from './token.js';
|
|
9
9
|
import { GetTransactionHistory, TransactionHistoryResponse } from './transaction-history.js';
|
|
10
10
|
import { HyperSDKClient } from 'hypersdk-client';
|
|
11
11
|
import { Agent } from 'http';
|
|
@@ -45,7 +45,7 @@ interface Module {
|
|
|
45
45
|
deriveAddress: (params: DeriveAddressParams) => Promise<DeriveAddressResponse>;
|
|
46
46
|
deriveAddresses: (params: DeriveAddressesParams) => Promise<DeriveAddressesResponse>;
|
|
47
47
|
buildDerivationPath: (params: BuildDerivationPathParams) => BuildDerivationPathResponse;
|
|
48
|
-
getTokens: (network: Network) => Promise<NetworkContractToken[]>;
|
|
48
|
+
getTokens: (network: Network) => Promise<(NetworkContractToken | HypercoreSpotToken)[]>;
|
|
49
49
|
onRpcRequest: (request: RpcRequest, chain: Network) => Promise<RpcResponse>;
|
|
50
50
|
}
|
|
51
51
|
|
package/dist/module.js
CHANGED
package/dist/token.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkEC2O5ECQ_cjs = require('./chunk-EC2O5ECQ.cjs');
|
|
4
4
|
require('./chunk-IQLAM2UJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, 'TokenType', {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkEC2O5ECQ_cjs.a; }
|
|
11
11
|
});
|
|
12
12
|
//# sourceMappingURL=out.js.map
|
|
13
13
|
//# sourceMappingURL=token.cjs.map
|
package/dist/token.d.cts
CHANGED
|
@@ -4,7 +4,8 @@ declare enum TokenType {
|
|
|
4
4
|
ERC721 = "ERC721",
|
|
5
5
|
ERC1155 = "ERC1155",
|
|
6
6
|
NONERC = "NONERC",
|
|
7
|
-
SPL = "SPL"
|
|
7
|
+
SPL = "SPL",
|
|
8
|
+
HYPERCORE_SPOT = "HYPERCORE_SPOT"
|
|
8
9
|
}
|
|
9
10
|
interface NetworkToken {
|
|
10
11
|
name: string;
|
|
@@ -57,5 +58,19 @@ interface NONERCToken {
|
|
|
57
58
|
name?: string;
|
|
58
59
|
symbol?: string;
|
|
59
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* HyperCore spot token. Identity is the Hyperliquid spot `index`, not an EVM
|
|
63
|
+
* contract. `evmContract` is present only when the asset is bridged to HyperEVM.
|
|
64
|
+
*/
|
|
65
|
+
interface HypercoreSpotToken {
|
|
66
|
+
type: TokenType.HYPERCORE_SPOT;
|
|
67
|
+
index: number;
|
|
68
|
+
name: string;
|
|
69
|
+
symbol: string;
|
|
70
|
+
decimals: number;
|
|
71
|
+
logoUri?: string;
|
|
72
|
+
/** Optional HyperEVM bridge contract; not required for HyperCore-only spot. */
|
|
73
|
+
evmContract?: string;
|
|
74
|
+
}
|
|
60
75
|
|
|
61
|
-
export { ERC1155Token, ERC20Token, ERC721Token, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType };
|
|
76
|
+
export { ERC1155Token, ERC20Token, ERC721Token, HypercoreSpotToken, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType };
|
package/dist/token.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ declare enum TokenType {
|
|
|
4
4
|
ERC721 = "ERC721",
|
|
5
5
|
ERC1155 = "ERC1155",
|
|
6
6
|
NONERC = "NONERC",
|
|
7
|
-
SPL = "SPL"
|
|
7
|
+
SPL = "SPL",
|
|
8
|
+
HYPERCORE_SPOT = "HYPERCORE_SPOT"
|
|
8
9
|
}
|
|
9
10
|
interface NetworkToken {
|
|
10
11
|
name: string;
|
|
@@ -57,5 +58,19 @@ interface NONERCToken {
|
|
|
57
58
|
name?: string;
|
|
58
59
|
symbol?: string;
|
|
59
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* HyperCore spot token. Identity is the Hyperliquid spot `index`, not an EVM
|
|
63
|
+
* contract. `evmContract` is present only when the asset is bridged to HyperEVM.
|
|
64
|
+
*/
|
|
65
|
+
interface HypercoreSpotToken {
|
|
66
|
+
type: TokenType.HYPERCORE_SPOT;
|
|
67
|
+
index: number;
|
|
68
|
+
name: string;
|
|
69
|
+
symbol: string;
|
|
70
|
+
decimals: number;
|
|
71
|
+
logoUri?: string;
|
|
72
|
+
/** Optional HyperEVM bridge contract; not required for HyperCore-only spot. */
|
|
73
|
+
evmContract?: string;
|
|
74
|
+
}
|
|
60
75
|
|
|
61
|
-
export { ERC1155Token, ERC20Token, ERC721Token, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType };
|
|
76
|
+
export { ERC1155Token, ERC20Token, ERC721Token, HypercoreSpotToken, NONERCToken, NetworkContractToken, NetworkToken, SPLToken, TokenType };
|
package/dist/token.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDTK5YHAN_cjs = require('./chunk-DTK5YHAN.cjs');
|
|
4
4
|
require('./chunk-IQLAM2UJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, 'PChainTransactionType', {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkDTK5YHAN_cjs.b; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, 'TransactionType', {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkDTK5YHAN_cjs.a; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, 'XChainTransactionType', {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkDTK5YHAN_cjs.c; }
|
|
19
19
|
});
|
|
20
20
|
//# sourceMappingURL=out.js.map
|
|
21
21
|
//# sourceMappingURL=transaction-history.cjs.map
|
|
@@ -43,6 +43,11 @@ type TxToken = {
|
|
|
43
43
|
type: TokenType.ERC20 | TokenType.ERC721 | TokenType.ERC1155 | TokenType.NONERC | TokenType.SPL;
|
|
44
44
|
} | {
|
|
45
45
|
type: TokenType.NATIVE;
|
|
46
|
+
} | {
|
|
47
|
+
type: TokenType.HYPERCORE_SPOT;
|
|
48
|
+
index: number;
|
|
49
|
+
/** Optional HyperEVM bridge contract when the spot asset is bridged. */
|
|
50
|
+
evmContract?: string;
|
|
46
51
|
});
|
|
47
52
|
type TokenWithAddress = {
|
|
48
53
|
/**
|
|
@@ -43,6 +43,11 @@ type TxToken = {
|
|
|
43
43
|
type: TokenType.ERC20 | TokenType.ERC721 | TokenType.ERC1155 | TokenType.NONERC | TokenType.SPL;
|
|
44
44
|
} | {
|
|
45
45
|
type: TokenType.NATIVE;
|
|
46
|
+
} | {
|
|
47
|
+
type: TokenType.HYPERCORE_SPOT;
|
|
48
|
+
index: number;
|
|
49
|
+
/** Optional HyperEVM bridge contract when the spot asset is bridged. */
|
|
50
|
+
evmContract?: string;
|
|
46
51
|
});
|
|
47
52
|
type TokenWithAddress = {
|
|
48
53
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as PChainTransactionType, a as TransactionType, c as XChainTransactionType } from './chunk-
|
|
1
|
+
export { b as PChainTransactionType, a as TransactionType, c as XChainTransactionType } from './chunk-4NLGTKVT.js';
|
|
2
2
|
import './chunk-DYCPFO4Y.js';
|
|
3
3
|
//# sourceMappingURL=out.js.map
|
|
4
4
|
//# sourceMappingURL=transaction-history.js.map
|
package/package.json
CHANGED
package/dist/chunk-EWK3W2OZ.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var o=(e=>(e.EVM="EVM",e.BITCOIN="BITCOIN",e.AVM="AVM",e.PVM="PVM",e.CoreEth="CoreEth",e.HVM="HVM",e.SVM="SVM",e))(o||{}),i=(t=>(t.PRODUCTION="production",t.DEV="dev",t))(i||{}),n=(r=>(r.CORE_MOBILE_IOS="core-mobile-ios",r.CORE_MOBILE_ANDROID="core-mobile-android",r.CORE_WEB="core-web",r.CORE_EXTENSION="core-extension",r.EXPLORER="explorer",r.OTHER="other",r))(n||{});
|
|
2
|
-
|
|
3
|
-
export { o as a, i as b, n as c };
|
|
4
|
-
//# sourceMappingURL=out.js.map
|
|
5
|
-
//# sourceMappingURL=chunk-EWK3W2OZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/common.ts"],"names":["NetworkVMType","Environment","AppName"],"mappings":"AA2BO,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 isDevnet?: boolean;\n chainId: number;\n caipId?: string;\n chainName: string;\n rpcUrl: string;\n customRpcHeaders?: Record<string, 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"]}
|
package/dist/chunk-GMF7R4KJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
package/dist/chunk-N7PCIGVW.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
package/dist/chunk-SNPLCK6A.cjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var o=(e=>(e.EVM="EVM",e.BITCOIN="BITCOIN",e.AVM="AVM",e.PVM="PVM",e.CoreEth="CoreEth",e.HVM="HVM",e.SVM="SVM",e))(o||{}),i=(t=>(t.PRODUCTION="production",t.DEV="dev",t))(i||{}),n=(r=>(r.CORE_MOBILE_IOS="core-mobile-ios",r.CORE_MOBILE_ANDROID="core-mobile-android",r.CORE_WEB="core-web",r.CORE_EXTENSION="core-extension",r.EXPLORER="explorer",r.OTHER="other",r))(n||{});
|
|
4
|
-
|
|
5
|
-
exports.a = o;
|
|
6
|
-
exports.b = i;
|
|
7
|
-
exports.c = n;
|
|
8
|
-
//# sourceMappingURL=out.js.map
|
|
9
|
-
//# sourceMappingURL=chunk-SNPLCK6A.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/common.ts"],"names":["NetworkVMType","Environment","AppName"],"mappings":"AA2BO,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 isDevnet?: boolean;\n chainId: number;\n caipId?: string;\n chainName: string;\n rpcUrl: string;\n customRpcHeaders?: Record<string, 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/transaction-history.ts"],"names":["TransactionType","PChainTransactionType","XChainTransactionType"],"mappings":"AA8EO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,QAAU,SACVA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,UACXA,EAAA,YAAc,aACdA,EAAA,QAAU,UACVA,EAAA,WAAa,YACbA,EAAA,OAAS,SACTA,EAAA,QAAU,UAbAA,OAAA,IAgBAC,OACVA,EAAA,iBAAmB,iBACnBA,EAAA,wBAA0B,uBAC1BA,EAAA,iBAAmB,iBACnBA,EAAA,gBAAkB,gBAClBA,EAAA,iBAAmB,iBACnBA,EAAA,UAAY,WACZA,EAAA,UAAY,WACZA,EAAA,gBAAkB,gBAClBA,EAAA,oBAAsB,oBACtBA,EAAA,2BAA6B,0BAC7BA,EAAA,oBAAsB,oBACtBA,EAAA,gCAAkC,+BAClCA,EAAA,gCAAkC,+BAClCA,EAAA,QAAU,SACVA,EAAA,6BAA+B,4BAC/BA,EAAA,QAAU,UAhBAA,OAAA,IAmBAC,OACVA,EAAA,QAAU,SACVA,EAAA,gBAAkB,gBAClBA,EAAA,aAAe,cACfA,EAAA,UAAY,WACZA,EAAA,UAAY,WACZA,EAAA,QAAU,UANAA,OAAA","sourcesContent":["import type { Network } from './common';\nimport type { TokenType } from './token';\n\nexport type GetTransactionHistory = {\n network: Network;\n address: string;\n nextPageToken?: string;\n offset?: number;\n};\n\nexport type TransactionHistoryResponse = {\n transactions: Transaction[];\n nextPageToken?: string;\n};\n\nexport type Transaction = {\n isContractCall: boolean;\n isIncoming: boolean;\n isOutgoing: boolean;\n isSender: boolean;\n timestamp: number;\n hash: string;\n from: string;\n to: string;\n tokens: TxToken[];\n gasPrice?: string;\n gasUsed: string;\n txType?: TransactionType | PChainTransactionType | XChainTransactionType | 'CreateAssetTx' | 'OperationTx';\n chainId: string; // chainId from ActiveNetwork used to fetch tx\n method?: string;\n explorerLink: string;\n};\n\nexport type TxToken = {\n decimal?: string;\n name: string;\n symbol: string;\n amount: string;\n imageUri?: string;\n from?: TokenWithAddress;\n to?: TokenWithAddress;\n collectableTokenId?: string;\n type: TokenType;\n} & (\n | {\n address: string;\n type: TokenType.ERC20 | TokenType.ERC721 | TokenType.ERC1155 | TokenType.NONERC | TokenType.SPL;\n }\n | {\n type: TokenType.NATIVE;\n }\n);\n\n// this is RichAddress from @avalabs/glacier-sdk,\n// rename it to TokenWithAddress for better understanding\ntype TokenWithAddress = {\n /**\n * The contract name.\n */\n name?: string;\n /**\n * The contract symbol.\n */\n symbol?: string;\n /**\n * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.\n */\n decimals?: number;\n /**\n * The logo uri for the address.\n */\n logoUri?: string;\n /**\n * A wallet or contract address in mixed-case checksum encoding.\n */\n address: string;\n};\n\nexport enum TransactionType {\n BRIDGE = 'Bridge',\n SWAP = 'Swap',\n SEND = 'Send',\n RECEIVE = 'Receive',\n NFT_BUY = 'NFTBuy',\n APPROVE = 'Approve',\n TRANSFER = 'Transfer',\n NFT_SEND = 'NFTSend',\n NFT_RECEIVE = 'NFTReceive',\n AIRDROP = 'Airdrop',\n FILL_ORDER = 'FillOrder',\n UNWRAP = 'Unwrap',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum PChainTransactionType {\n ADD_VALIDATOR_TX = 'AddValidatorTx',\n ADD_SUBNET_VALIDATOR_TX = 'AddSubnetValidatorTx',\n ADD_DELEGATOR_TX = 'AddDelegatorTx',\n CREATE_CHAIN_TX = 'CreateChainTx',\n CREATE_SUBNET_TX = 'CreateSubnetTx',\n IMPORT_TX = 'ImportTx',\n EXPORT_TX = 'ExportTx',\n ADVANCE_TIME_TX = 'AdvanceTimeTx',\n REWARD_VALIDATOR_TX = 'RewardValidatorTx',\n REMOVE_SUBNET_VALIDATOR_TX = 'RemoveSubnetValidatorTx',\n TRANSFORM_SUBNET_TX = 'TransformSubnetTx',\n ADD_PERMISSIONLESS_VALIDATOR_TX = 'AddPermissionlessValidatorTx',\n ADD_PERMISSIONLESS_DELEGATOR_TX = 'AddPermissionlessDelegatorTx',\n BASE_TX = 'BaseTx',\n TRANSFER_SUBNET_OWNERSHIP_TX = 'TransferSubnetOwnershipTx',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum XChainTransactionType {\n BASE_TX = 'BaseTx',\n CREATE_ASSET_TX = 'CreateAssetTx',\n OPERATION_TX = 'OperationTx',\n IMPORT_TX = 'ImportTx',\n EXPORT_TX = 'ExportTx',\n UNKNOWN = 'UNKNOWN',\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/transaction-history.ts"],"names":["TransactionType","PChainTransactionType","XChainTransactionType"],"mappings":"AA8EO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,QAAU,SACVA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,UACXA,EAAA,YAAc,aACdA,EAAA,QAAU,UACVA,EAAA,WAAa,YACbA,EAAA,OAAS,SACTA,EAAA,QAAU,UAbAA,OAAA,IAgBAC,OACVA,EAAA,iBAAmB,iBACnBA,EAAA,wBAA0B,uBAC1BA,EAAA,iBAAmB,iBACnBA,EAAA,gBAAkB,gBAClBA,EAAA,iBAAmB,iBACnBA,EAAA,UAAY,WACZA,EAAA,UAAY,WACZA,EAAA,gBAAkB,gBAClBA,EAAA,oBAAsB,oBACtBA,EAAA,2BAA6B,0BAC7BA,EAAA,oBAAsB,oBACtBA,EAAA,gCAAkC,+BAClCA,EAAA,gCAAkC,+BAClCA,EAAA,QAAU,SACVA,EAAA,6BAA+B,4BAC/BA,EAAA,QAAU,UAhBAA,OAAA,IAmBAC,OACVA,EAAA,QAAU,SACVA,EAAA,gBAAkB,gBAClBA,EAAA,aAAe,cACfA,EAAA,UAAY,WACZA,EAAA,UAAY,WACZA,EAAA,QAAU,UANAA,OAAA","sourcesContent":["import type { Network } from './common';\nimport type { TokenType } from './token';\n\nexport type GetTransactionHistory = {\n network: Network;\n address: string;\n nextPageToken?: string;\n offset?: number;\n};\n\nexport type TransactionHistoryResponse = {\n transactions: Transaction[];\n nextPageToken?: string;\n};\n\nexport type Transaction = {\n isContractCall: boolean;\n isIncoming: boolean;\n isOutgoing: boolean;\n isSender: boolean;\n timestamp: number;\n hash: string;\n from: string;\n to: string;\n tokens: TxToken[];\n gasPrice?: string;\n gasUsed: string;\n txType?: TransactionType | PChainTransactionType | XChainTransactionType | 'CreateAssetTx' | 'OperationTx';\n chainId: string; // chainId from ActiveNetwork used to fetch tx\n method?: string;\n explorerLink: string;\n};\n\nexport type TxToken = {\n decimal?: string;\n name: string;\n symbol: string;\n amount: string;\n imageUri?: string;\n from?: TokenWithAddress;\n to?: TokenWithAddress;\n collectableTokenId?: string;\n type: TokenType;\n} & (\n | {\n address: string;\n type: TokenType.ERC20 | TokenType.ERC721 | TokenType.ERC1155 | TokenType.NONERC | TokenType.SPL;\n }\n | {\n type: TokenType.NATIVE;\n }\n);\n\n// this is RichAddress from @avalabs/glacier-sdk,\n// rename it to TokenWithAddress for better understanding\ntype TokenWithAddress = {\n /**\n * The contract name.\n */\n name?: string;\n /**\n * The contract symbol.\n */\n symbol?: string;\n /**\n * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.\n */\n decimals?: number;\n /**\n * The logo uri for the address.\n */\n logoUri?: string;\n /**\n * A wallet or contract address in mixed-case checksum encoding.\n */\n address: string;\n};\n\nexport enum TransactionType {\n BRIDGE = 'Bridge',\n SWAP = 'Swap',\n SEND = 'Send',\n RECEIVE = 'Receive',\n NFT_BUY = 'NFTBuy',\n APPROVE = 'Approve',\n TRANSFER = 'Transfer',\n NFT_SEND = 'NFTSend',\n NFT_RECEIVE = 'NFTReceive',\n AIRDROP = 'Airdrop',\n FILL_ORDER = 'FillOrder',\n UNWRAP = 'Unwrap',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum PChainTransactionType {\n ADD_VALIDATOR_TX = 'AddValidatorTx',\n ADD_SUBNET_VALIDATOR_TX = 'AddSubnetValidatorTx',\n ADD_DELEGATOR_TX = 'AddDelegatorTx',\n CREATE_CHAIN_TX = 'CreateChainTx',\n CREATE_SUBNET_TX = 'CreateSubnetTx',\n IMPORT_TX = 'ImportTx',\n EXPORT_TX = 'ExportTx',\n ADVANCE_TIME_TX = 'AdvanceTimeTx',\n REWARD_VALIDATOR_TX = 'RewardValidatorTx',\n REMOVE_SUBNET_VALIDATOR_TX = 'RemoveSubnetValidatorTx',\n TRANSFORM_SUBNET_TX = 'TransformSubnetTx',\n ADD_PERMISSIONLESS_VALIDATOR_TX = 'AddPermissionlessValidatorTx',\n ADD_PERMISSIONLESS_DELEGATOR_TX = 'AddPermissionlessDelegatorTx',\n BASE_TX = 'BaseTx',\n TRANSFER_SUBNET_OWNERSHIP_TX = 'TransferSubnetOwnershipTx',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport enum XChainTransactionType {\n BASE_TX = 'BaseTx',\n CREATE_ASSET_TX = 'CreateAssetTx',\n OPERATION_TX = 'OperationTx',\n IMPORT_TX = 'ImportTx',\n EXPORT_TX = 'ExportTx',\n UNKNOWN = 'UNKNOWN',\n}\n"]}
|