@0xsequence/api
Advanced tools
+18
-0
| # @0xsequence/api | ||
| ## 0.29.0 | ||
| ### Minor Changes | ||
| - major architectural changes in Sequence design | ||
| - only one API instance, API is no longer a per-chain service | ||
| - separate per-chain indexer service, API no longer handles indexing | ||
| - single contract metadata service, API no longer serves metadata | ||
| chaind package has been removed, indexer and metadata packages have been added | ||
| stronger typing with new explicit ChainId type | ||
| multicall fixes and improvements | ||
| forbid "wait" transactions in sendTransactionBatch calls | ||
| ## 0.28.0 | ||
@@ -4,0 +22,0 @@ |
@@ -30,3 +30,3 @@ 'use strict'; | ||
| /* eslint-disable */ | ||
| // arcadeum-api v0.3.0 f7ddfd2b65953c3fc7717c519e3fb5f1b4b800e8 | ||
| // sequence-api v0.4.0 8e3575e965dc76a152d48e0b6660271db4d0c5be | ||
| // -- | ||
@@ -38,91 +38,8 @@ // This file has been generated by https://github.com/webrpc/webrpc using gen/typescript | ||
| const WebRPCSchemaVersion = "v0.3.0"; // Schema hash generated from your RIDL schema | ||
| const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema | ||
| const WebRPCSchemaHash = "f7ddfd2b65953c3fc7717c519e3fb5f1b4b800e8"; // | ||
| const WebRPCSchemaHash = "8e3575e965dc76a152d48e0b6660271db4d0c5be"; // | ||
| // Types | ||
| // | ||
| exports.ChainStateProp = void 0; | ||
| (function (ChainStateProp) { | ||
| ChainStateProp["UNKNOWN"] = "UNKNOWN"; | ||
| ChainStateProp["LAST_BLOCK_INDEXED"] = "LAST_BLOCK_INDEXED"; | ||
| ChainStateProp["LAST_EVENT_LOG_PROCESSED"] = "LAST_EVENT_LOG_PROCESSED"; | ||
| })(exports.ChainStateProp || (exports.ChainStateProp = {})); | ||
| exports.ETHNetwork = void 0; | ||
| (function (ETHNetwork) { | ||
| ETHNetwork["UNKNOWN"] = "UNKNOWN"; | ||
| ETHNetwork["MAINNET"] = "MAINNET"; | ||
| ETHNetwork["MORDEN"] = "MORDEN"; | ||
| ETHNetwork["ROPSTEN"] = "ROPSTEN"; | ||
| ETHNetwork["RINKEBY"] = "RINKEBY"; | ||
| ETHNetwork["GOERLI"] = "GOERLI"; | ||
| ETHNetwork["KOVAN"] = "KOVAN"; | ||
| ETHNetwork["GANACHE"] = "GANACHE"; | ||
| ETHNetwork["MATIC"] = "MATIC"; | ||
| })(exports.ETHNetwork || (exports.ETHNetwork = {})); | ||
| exports.ContractType = void 0; | ||
| (function (ContractType) { | ||
| ContractType["UNKNOWN"] = "UNKNOWN"; | ||
| ContractType["ERC20_TOKEN"] = "ERC20_TOKEN"; | ||
| ContractType["ERC721_TOKEN"] = "ERC721_TOKEN"; | ||
| ContractType["ERC1155_TOKEN"] = "ERC1155_TOKEN"; | ||
| ContractType["META_ERC20_WRAPPER"] = "META_ERC20_WRAPPER"; | ||
| ContractType["NIFTYSWAP"] = "NIFTYSWAP"; | ||
| ContractType["BRIDGE"] = "BRIDGE"; | ||
| })(exports.ContractType || (exports.ContractType = {})); | ||
| exports.ContractCategory = void 0; | ||
| (function (ContractCategory) { | ||
| ContractCategory["UNKNOWN"] = "UNKNOWN"; | ||
| ContractCategory["COIN"] = "COIN"; | ||
| ContractCategory["COLLECTIBLE"] = "COLLECTIBLE"; | ||
| })(exports.ContractCategory || (exports.ContractCategory = {})); | ||
| exports.EventLogType = void 0; | ||
| (function (EventLogType) { | ||
| EventLogType["UNKNOWN"] = "UNKNOWN"; | ||
| EventLogType["BLOCK_ADDED"] = "BLOCK_ADDED"; | ||
| EventLogType["BLOCK_REMOVED"] = "BLOCK_REMOVED"; | ||
| EventLogType["BLOCK_UPDATED"] = "BLOCK_UPDATED"; | ||
| EventLogType["TXN_LOG"] = "TXN_LOG"; | ||
| })(exports.EventLogType || (exports.EventLogType = {})); | ||
| exports.ETHTxnStatus = void 0; | ||
| (function (ETHTxnStatus) { | ||
| ETHTxnStatus["UNKNOWN"] = "UNKNOWN"; | ||
| ETHTxnStatus["FAILED"] = "FAILED"; | ||
| ETHTxnStatus["PARTIALLY_FAILED"] = "PARTIALLY_FAILED"; | ||
| ETHTxnStatus["SENT"] = "SENT"; | ||
| ETHTxnStatus["REVERTED"] = "REVERTED"; | ||
| ETHTxnStatus["SUCCESS"] = "SUCCESS"; | ||
| ETHTxnStatus["FINAL"] = "FINAL"; | ||
| ETHTxnStatus["DROPPED"] = "DROPPED"; | ||
| })(exports.ETHTxnStatus || (exports.ETHTxnStatus = {})); | ||
| exports.OrderType = void 0; | ||
| (function (OrderType) { | ||
| OrderType["UNKNOWN"] = "UNKNOWN"; | ||
| OrderType["BUY"] = "BUY"; | ||
| OrderType["SELL"] = "SELL"; | ||
| })(exports.OrderType || (exports.OrderType = {})); | ||
| exports.OrderStatus = void 0; | ||
| (function (OrderStatus) { | ||
| OrderStatus["UNKNOWN"] = "UNKNOWN"; | ||
| OrderStatus["FAILED"] = "FAILED"; | ||
| OrderStatus["PENDING"] = "PENDING"; | ||
| OrderStatus["SUCCESS"] = "SUCCESS"; | ||
| OrderStatus["FINAL"] = "FINAL"; | ||
| })(exports.OrderStatus || (exports.OrderStatus = {})); | ||
| exports.SortOrder = void 0; | ||
@@ -135,30 +52,16 @@ | ||
| exports.TransferType = void 0; | ||
| (function (TransferType) { | ||
| TransferType["SEND"] = "SEND"; | ||
| TransferType["RECEIVE"] = "RECEIVE"; | ||
| TransferType["BRIDGE_DEPOSIT"] = "BRIDGE_DEPOSIT"; | ||
| TransferType["BRIDGE_WITHDRAW"] = "BRIDGE_WITHDRAW"; | ||
| TransferType["BURN"] = "BURN"; | ||
| TransferType["UNKNOWN"] = "UNKNOWN"; | ||
| })(exports.TransferType || (exports.TransferType = {})); | ||
| // | ||
| // Client | ||
| // | ||
| class ArcadeumAPI { | ||
| class API { | ||
| constructor(hostname, fetch) { | ||
| this.hostname = void 0; | ||
| this.fetch = void 0; | ||
| this.path = '/rpc/ArcadeumAPI/'; | ||
| this.path = '/rpc/API/'; | ||
| this.getAuthToken = (args, headers) => { | ||
| return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers)).then(res => { | ||
| this.ping = headers => { | ||
| return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| jwtToken: _data.jwtToken, | ||
| address: _data.address, | ||
| user: _data.user | ||
| status: _data.status | ||
| }; | ||
@@ -169,8 +72,7 @@ }); | ||
| this.getSession = headers => { | ||
| return this.fetch(this.url('GetSession'), createHTTPRequest({}, headers)).then(res => { | ||
| this.version = headers => { | ||
| return this.fetch(this.url('Version'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| address: _data.address, | ||
| user: _data.user | ||
| version: _data.version | ||
| }; | ||
@@ -181,4 +83,4 @@ }); | ||
| this.internalClaimAccessCode = (args, headers) => { | ||
| return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers)).then(res => { | ||
| this.runtimeStatus = headers => { | ||
| return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
@@ -192,7 +94,7 @@ return { | ||
| this.walletRecover = (args, headers) => { | ||
| return this.fetch(this.url('WalletRecover'), createHTTPRequest(args, headers)).then(res => { | ||
| this.getSequenceContext = headers => { | ||
| return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| encryptedWallet: _data.encryptedWallet | ||
| data: _data.data | ||
| }; | ||
@@ -203,2 +105,15 @@ }); | ||
| this.getAuthToken = (args, headers) => { | ||
| return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| jwtToken: _data.jwtToken, | ||
| address: _data.address, | ||
| user: _data.user | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.friendList = (args, headers) => { | ||
@@ -268,7 +183,7 @@ return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers)).then(res => { | ||
| this.getContract = (args, headers) => { | ||
| return this.fetch(this.url('GetContract'), createHTTPRequest(args, headers)).then(res => { | ||
| this.contractCall = (args, headers) => { | ||
| return this.fetch(this.url('ContractCall'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contract: _data.contract | ||
| returns: _data.returns | ||
| }; | ||
@@ -279,7 +194,7 @@ }); | ||
| this.getContractByAlias = (args, headers) => { | ||
| return this.fetch(this.url('GetContractByAlias'), createHTTPRequest(args, headers)).then(res => { | ||
| this.decodeContractCall = (args, headers) => { | ||
| return this.fetch(this.url('DecodeContractCall'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contract: _data.contract | ||
| call: _data.call | ||
| }; | ||
@@ -290,7 +205,7 @@ }); | ||
| this.getTokenContractsWithBalances = headers => { | ||
| return this.fetch(this.url('GetTokenContractsWithBalances'), createHTTPRequest({}, headers)).then(res => { | ||
| this.lookupContractCallSelectors = (args, headers) => { | ||
| return this.fetch(this.url('LookupContractCallSelectors'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contracts: _data.contracts | ||
| signatures: _data.signatures | ||
| }; | ||
@@ -301,199 +216,2 @@ }); | ||
| this.getTokenBalances = headers => { | ||
| return this.fetch(this.url('GetTokenBalances'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| balances: _data.balances | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.metaTxLogList = (args, headers) => { | ||
| return this.fetch(this.url('MetaTxLogList'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| logs: _data.logs | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.transactionHistory = (args, headers) => { | ||
| return this.fetch(this.url('TransactionHistory'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| transactions: _data.transactions | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.sentTransactions = (args, headers) => { | ||
| return this.fetch(this.url('SentTransactions'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| transactions: _data.transactions | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.accountEtherBalance = (args, headers) => { | ||
| return this.fetch(this.url('AccountEtherBalance'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| balance: _data.balance | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getAccountBalances = (args, headers) => { | ||
| return this.fetch(this.url('GetAccountBalances'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| balances: _data.balances | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getBalanceUpdates = (args, headers) => { | ||
| return this.fetch(this.url('GetBalanceUpdates'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| balances: _data.balances | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getTokenMetadata = (args, headers) => { | ||
| return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| tokenMetadata: _data.tokenMetadata | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.decodeTxnData = (args, headers) => { | ||
| return this.fetch(this.url('DecodeTxnData'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| res: _data.res | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getNiftyswapTokenSupply = (args, headers) => { | ||
| return this.fetch(this.url('GetNiftyswapTokenSupply'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| amounts: _data.amounts | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getNiftyswapUnitPrices = (args, headers) => { | ||
| return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| prices: _data.prices | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.sendMetaTxn = (args, headers) => { | ||
| return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| txnHash: _data.txnHash | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getMetaTxnNonce = (args, headers) => { | ||
| return this.fetch(this.url('GetMetaTxnNonce'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| nonce: _data.nonce | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getSmartWalletContext = headers => { | ||
| return this.fetch(this.url('GetSmartWalletContext'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| data: _data.data | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getMetaTxnReceipt = (args, headers) => { | ||
| return this.fetch(this.url('GetMetaTxnReceipt'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| receipt: _data.receipt | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getChainID = headers => { | ||
| return this.fetch(this.url('GetChainID'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| chainID: _data.chainID | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.tokenFee = headers => { | ||
| return this.fetch(this.url('TokenFee'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| isFee: _data.isFee, | ||
| fee: _data.fee | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.updateMetaTxnGasLimits = (args, headers) => { | ||
| return this.fetch(this.url('UpdateMetaTxnGasLimits'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| payload: _data.payload | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getMetaTxnNetworkFeeOptions = (args, headers) => { | ||
| return this.fetch(this.url('GetMetaTxnNetworkFeeOptions'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| options: _data.options | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getInviteInfo = headers => { | ||
@@ -509,4 +227,4 @@ return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => { | ||
| this.ping = headers => { | ||
| return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => { | ||
| this.internalClaimAccessCode = (args, headers) => { | ||
| return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
@@ -520,7 +238,7 @@ return { | ||
| this.version = headers => { | ||
| return this.fetch(this.url('Version'), createHTTPRequest({}, headers)).then(res => { | ||
| this.walletRecover = (args, headers) => { | ||
| return this.fetch(this.url('WalletRecover'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| version: _data.version | ||
| encryptedWallet: _data.encryptedWallet | ||
| }; | ||
@@ -531,12 +249,2 @@ }); | ||
| this.requirements = headers => { | ||
| return this.fetch(this.url('Requirements'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| reqs: _data.reqs | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.hostname = hostname; | ||
@@ -584,3 +292,3 @@ this.fetch = fetch; | ||
| class ArcadeumAPIClient extends ArcadeumAPI { | ||
| class SequenceAPIClient extends API { | ||
| constructor(hostname, jwtAuth) { | ||
@@ -609,6 +317,6 @@ super(hostname, fetch__default['default']); | ||
| exports.ArcadeumAPI = ArcadeumAPI; | ||
| exports.ArcadeumAPIClient = ArcadeumAPIClient; | ||
| exports.API = API; | ||
| exports.SequenceAPIClient = SequenceAPIClient; | ||
| exports.WebRPCSchemaHash = WebRPCSchemaHash; | ||
| exports.WebRPCSchemaVersion = WebRPCSchemaVersion; | ||
| exports.WebRPCVersion = WebRPCVersion; |
@@ -30,3 +30,3 @@ 'use strict'; | ||
| /* eslint-disable */ | ||
| // arcadeum-api v0.3.0 f7ddfd2b65953c3fc7717c519e3fb5f1b4b800e8 | ||
| // sequence-api v0.4.0 8e3575e965dc76a152d48e0b6660271db4d0c5be | ||
| // -- | ||
@@ -38,91 +38,8 @@ // This file has been generated by https://github.com/webrpc/webrpc using gen/typescript | ||
| const WebRPCSchemaVersion = "v0.3.0"; // Schema hash generated from your RIDL schema | ||
| const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema | ||
| const WebRPCSchemaHash = "f7ddfd2b65953c3fc7717c519e3fb5f1b4b800e8"; // | ||
| const WebRPCSchemaHash = "8e3575e965dc76a152d48e0b6660271db4d0c5be"; // | ||
| // Types | ||
| // | ||
| exports.ChainStateProp = void 0; | ||
| (function (ChainStateProp) { | ||
| ChainStateProp["UNKNOWN"] = "UNKNOWN"; | ||
| ChainStateProp["LAST_BLOCK_INDEXED"] = "LAST_BLOCK_INDEXED"; | ||
| ChainStateProp["LAST_EVENT_LOG_PROCESSED"] = "LAST_EVENT_LOG_PROCESSED"; | ||
| })(exports.ChainStateProp || (exports.ChainStateProp = {})); | ||
| exports.ETHNetwork = void 0; | ||
| (function (ETHNetwork) { | ||
| ETHNetwork["UNKNOWN"] = "UNKNOWN"; | ||
| ETHNetwork["MAINNET"] = "MAINNET"; | ||
| ETHNetwork["MORDEN"] = "MORDEN"; | ||
| ETHNetwork["ROPSTEN"] = "ROPSTEN"; | ||
| ETHNetwork["RINKEBY"] = "RINKEBY"; | ||
| ETHNetwork["GOERLI"] = "GOERLI"; | ||
| ETHNetwork["KOVAN"] = "KOVAN"; | ||
| ETHNetwork["GANACHE"] = "GANACHE"; | ||
| ETHNetwork["MATIC"] = "MATIC"; | ||
| })(exports.ETHNetwork || (exports.ETHNetwork = {})); | ||
| exports.ContractType = void 0; | ||
| (function (ContractType) { | ||
| ContractType["UNKNOWN"] = "UNKNOWN"; | ||
| ContractType["ERC20_TOKEN"] = "ERC20_TOKEN"; | ||
| ContractType["ERC721_TOKEN"] = "ERC721_TOKEN"; | ||
| ContractType["ERC1155_TOKEN"] = "ERC1155_TOKEN"; | ||
| ContractType["META_ERC20_WRAPPER"] = "META_ERC20_WRAPPER"; | ||
| ContractType["NIFTYSWAP"] = "NIFTYSWAP"; | ||
| ContractType["BRIDGE"] = "BRIDGE"; | ||
| })(exports.ContractType || (exports.ContractType = {})); | ||
| exports.ContractCategory = void 0; | ||
| (function (ContractCategory) { | ||
| ContractCategory["UNKNOWN"] = "UNKNOWN"; | ||
| ContractCategory["COIN"] = "COIN"; | ||
| ContractCategory["COLLECTIBLE"] = "COLLECTIBLE"; | ||
| })(exports.ContractCategory || (exports.ContractCategory = {})); | ||
| exports.EventLogType = void 0; | ||
| (function (EventLogType) { | ||
| EventLogType["UNKNOWN"] = "UNKNOWN"; | ||
| EventLogType["BLOCK_ADDED"] = "BLOCK_ADDED"; | ||
| EventLogType["BLOCK_REMOVED"] = "BLOCK_REMOVED"; | ||
| EventLogType["BLOCK_UPDATED"] = "BLOCK_UPDATED"; | ||
| EventLogType["TXN_LOG"] = "TXN_LOG"; | ||
| })(exports.EventLogType || (exports.EventLogType = {})); | ||
| exports.ETHTxnStatus = void 0; | ||
| (function (ETHTxnStatus) { | ||
| ETHTxnStatus["UNKNOWN"] = "UNKNOWN"; | ||
| ETHTxnStatus["FAILED"] = "FAILED"; | ||
| ETHTxnStatus["PARTIALLY_FAILED"] = "PARTIALLY_FAILED"; | ||
| ETHTxnStatus["SENT"] = "SENT"; | ||
| ETHTxnStatus["REVERTED"] = "REVERTED"; | ||
| ETHTxnStatus["SUCCESS"] = "SUCCESS"; | ||
| ETHTxnStatus["FINAL"] = "FINAL"; | ||
| ETHTxnStatus["DROPPED"] = "DROPPED"; | ||
| })(exports.ETHTxnStatus || (exports.ETHTxnStatus = {})); | ||
| exports.OrderType = void 0; | ||
| (function (OrderType) { | ||
| OrderType["UNKNOWN"] = "UNKNOWN"; | ||
| OrderType["BUY"] = "BUY"; | ||
| OrderType["SELL"] = "SELL"; | ||
| })(exports.OrderType || (exports.OrderType = {})); | ||
| exports.OrderStatus = void 0; | ||
| (function (OrderStatus) { | ||
| OrderStatus["UNKNOWN"] = "UNKNOWN"; | ||
| OrderStatus["FAILED"] = "FAILED"; | ||
| OrderStatus["PENDING"] = "PENDING"; | ||
| OrderStatus["SUCCESS"] = "SUCCESS"; | ||
| OrderStatus["FINAL"] = "FINAL"; | ||
| })(exports.OrderStatus || (exports.OrderStatus = {})); | ||
| exports.SortOrder = void 0; | ||
@@ -135,30 +52,16 @@ | ||
| exports.TransferType = void 0; | ||
| (function (TransferType) { | ||
| TransferType["SEND"] = "SEND"; | ||
| TransferType["RECEIVE"] = "RECEIVE"; | ||
| TransferType["BRIDGE_DEPOSIT"] = "BRIDGE_DEPOSIT"; | ||
| TransferType["BRIDGE_WITHDRAW"] = "BRIDGE_WITHDRAW"; | ||
| TransferType["BURN"] = "BURN"; | ||
| TransferType["UNKNOWN"] = "UNKNOWN"; | ||
| })(exports.TransferType || (exports.TransferType = {})); | ||
| // | ||
| // Client | ||
| // | ||
| class ArcadeumAPI { | ||
| class API { | ||
| constructor(hostname, fetch) { | ||
| this.hostname = void 0; | ||
| this.fetch = void 0; | ||
| this.path = '/rpc/ArcadeumAPI/'; | ||
| this.path = '/rpc/API/'; | ||
| this.getAuthToken = (args, headers) => { | ||
| return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers)).then(res => { | ||
| this.ping = headers => { | ||
| return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| jwtToken: _data.jwtToken, | ||
| address: _data.address, | ||
| user: _data.user | ||
| status: _data.status | ||
| }; | ||
@@ -169,8 +72,7 @@ }); | ||
| this.getSession = headers => { | ||
| return this.fetch(this.url('GetSession'), createHTTPRequest({}, headers)).then(res => { | ||
| this.version = headers => { | ||
| return this.fetch(this.url('Version'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| address: _data.address, | ||
| user: _data.user | ||
| version: _data.version | ||
| }; | ||
@@ -181,4 +83,4 @@ }); | ||
| this.internalClaimAccessCode = (args, headers) => { | ||
| return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers)).then(res => { | ||
| this.runtimeStatus = headers => { | ||
| return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
@@ -192,7 +94,7 @@ return { | ||
| this.walletRecover = (args, headers) => { | ||
| return this.fetch(this.url('WalletRecover'), createHTTPRequest(args, headers)).then(res => { | ||
| this.getSequenceContext = headers => { | ||
| return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| encryptedWallet: _data.encryptedWallet | ||
| data: _data.data | ||
| }; | ||
@@ -203,2 +105,15 @@ }); | ||
| this.getAuthToken = (args, headers) => { | ||
| return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| jwtToken: _data.jwtToken, | ||
| address: _data.address, | ||
| user: _data.user | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.friendList = (args, headers) => { | ||
@@ -268,7 +183,7 @@ return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers)).then(res => { | ||
| this.getContract = (args, headers) => { | ||
| return this.fetch(this.url('GetContract'), createHTTPRequest(args, headers)).then(res => { | ||
| this.contractCall = (args, headers) => { | ||
| return this.fetch(this.url('ContractCall'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contract: _data.contract | ||
| returns: _data.returns | ||
| }; | ||
@@ -279,7 +194,7 @@ }); | ||
| this.getContractByAlias = (args, headers) => { | ||
| return this.fetch(this.url('GetContractByAlias'), createHTTPRequest(args, headers)).then(res => { | ||
| this.decodeContractCall = (args, headers) => { | ||
| return this.fetch(this.url('DecodeContractCall'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contract: _data.contract | ||
| call: _data.call | ||
| }; | ||
@@ -290,7 +205,7 @@ }); | ||
| this.getTokenContractsWithBalances = headers => { | ||
| return this.fetch(this.url('GetTokenContractsWithBalances'), createHTTPRequest({}, headers)).then(res => { | ||
| this.lookupContractCallSelectors = (args, headers) => { | ||
| return this.fetch(this.url('LookupContractCallSelectors'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contracts: _data.contracts | ||
| signatures: _data.signatures | ||
| }; | ||
@@ -301,199 +216,2 @@ }); | ||
| this.getTokenBalances = headers => { | ||
| return this.fetch(this.url('GetTokenBalances'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| balances: _data.balances | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.metaTxLogList = (args, headers) => { | ||
| return this.fetch(this.url('MetaTxLogList'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| logs: _data.logs | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.transactionHistory = (args, headers) => { | ||
| return this.fetch(this.url('TransactionHistory'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| transactions: _data.transactions | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.sentTransactions = (args, headers) => { | ||
| return this.fetch(this.url('SentTransactions'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| transactions: _data.transactions | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.accountEtherBalance = (args, headers) => { | ||
| return this.fetch(this.url('AccountEtherBalance'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| balance: _data.balance | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getAccountBalances = (args, headers) => { | ||
| return this.fetch(this.url('GetAccountBalances'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| balances: _data.balances | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getBalanceUpdates = (args, headers) => { | ||
| return this.fetch(this.url('GetBalanceUpdates'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| balances: _data.balances | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getTokenMetadata = (args, headers) => { | ||
| return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| tokenMetadata: _data.tokenMetadata | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.decodeTxnData = (args, headers) => { | ||
| return this.fetch(this.url('DecodeTxnData'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| res: _data.res | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getNiftyswapTokenSupply = (args, headers) => { | ||
| return this.fetch(this.url('GetNiftyswapTokenSupply'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| amounts: _data.amounts | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getNiftyswapUnitPrices = (args, headers) => { | ||
| return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| prices: _data.prices | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.sendMetaTxn = (args, headers) => { | ||
| return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| txnHash: _data.txnHash | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getMetaTxnNonce = (args, headers) => { | ||
| return this.fetch(this.url('GetMetaTxnNonce'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| nonce: _data.nonce | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getSmartWalletContext = headers => { | ||
| return this.fetch(this.url('GetSmartWalletContext'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| data: _data.data | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getMetaTxnReceipt = (args, headers) => { | ||
| return this.fetch(this.url('GetMetaTxnReceipt'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| receipt: _data.receipt | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getChainID = headers => { | ||
| return this.fetch(this.url('GetChainID'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| chainID: _data.chainID | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.tokenFee = headers => { | ||
| return this.fetch(this.url('TokenFee'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| isFee: _data.isFee, | ||
| fee: _data.fee | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.updateMetaTxnGasLimits = (args, headers) => { | ||
| return this.fetch(this.url('UpdateMetaTxnGasLimits'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| payload: _data.payload | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getMetaTxnNetworkFeeOptions = (args, headers) => { | ||
| return this.fetch(this.url('GetMetaTxnNetworkFeeOptions'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| options: _data.options | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getInviteInfo = headers => { | ||
@@ -509,4 +227,4 @@ return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => { | ||
| this.ping = headers => { | ||
| return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => { | ||
| this.internalClaimAccessCode = (args, headers) => { | ||
| return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
@@ -520,7 +238,7 @@ return { | ||
| this.version = headers => { | ||
| return this.fetch(this.url('Version'), createHTTPRequest({}, headers)).then(res => { | ||
| this.walletRecover = (args, headers) => { | ||
| return this.fetch(this.url('WalletRecover'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| version: _data.version | ||
| encryptedWallet: _data.encryptedWallet | ||
| }; | ||
@@ -531,12 +249,2 @@ }); | ||
| this.requirements = headers => { | ||
| return this.fetch(this.url('Requirements'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| reqs: _data.reqs | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.hostname = hostname; | ||
@@ -584,3 +292,3 @@ this.fetch = fetch; | ||
| class ArcadeumAPIClient extends ArcadeumAPI { | ||
| class SequenceAPIClient extends API { | ||
| constructor(hostname, jwtAuth) { | ||
@@ -609,6 +317,6 @@ super(hostname, fetch__default['default']); | ||
| exports.ArcadeumAPI = ArcadeumAPI; | ||
| exports.ArcadeumAPIClient = ArcadeumAPIClient; | ||
| exports.API = API; | ||
| exports.SequenceAPIClient = SequenceAPIClient; | ||
| exports.WebRPCSchemaHash = WebRPCSchemaHash; | ||
| exports.WebRPCSchemaVersion = WebRPCSchemaVersion; | ||
| exports.WebRPCVersion = WebRPCVersion; |
+45
-337
@@ -22,3 +22,3 @@ import fetch from 'cross-fetch'; | ||
| /* eslint-disable */ | ||
| // arcadeum-api v0.3.0 f7ddfd2b65953c3fc7717c519e3fb5f1b4b800e8 | ||
| // sequence-api v0.4.0 8e3575e965dc76a152d48e0b6660271db4d0c5be | ||
| // -- | ||
@@ -30,91 +30,8 @@ // This file has been generated by https://github.com/webrpc/webrpc using gen/typescript | ||
| const WebRPCSchemaVersion = "v0.3.0"; // Schema hash generated from your RIDL schema | ||
| const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema | ||
| const WebRPCSchemaHash = "f7ddfd2b65953c3fc7717c519e3fb5f1b4b800e8"; // | ||
| const WebRPCSchemaHash = "8e3575e965dc76a152d48e0b6660271db4d0c5be"; // | ||
| // Types | ||
| // | ||
| let ChainStateProp; | ||
| (function (ChainStateProp) { | ||
| ChainStateProp["UNKNOWN"] = "UNKNOWN"; | ||
| ChainStateProp["LAST_BLOCK_INDEXED"] = "LAST_BLOCK_INDEXED"; | ||
| ChainStateProp["LAST_EVENT_LOG_PROCESSED"] = "LAST_EVENT_LOG_PROCESSED"; | ||
| })(ChainStateProp || (ChainStateProp = {})); | ||
| let ETHNetwork; | ||
| (function (ETHNetwork) { | ||
| ETHNetwork["UNKNOWN"] = "UNKNOWN"; | ||
| ETHNetwork["MAINNET"] = "MAINNET"; | ||
| ETHNetwork["MORDEN"] = "MORDEN"; | ||
| ETHNetwork["ROPSTEN"] = "ROPSTEN"; | ||
| ETHNetwork["RINKEBY"] = "RINKEBY"; | ||
| ETHNetwork["GOERLI"] = "GOERLI"; | ||
| ETHNetwork["KOVAN"] = "KOVAN"; | ||
| ETHNetwork["GANACHE"] = "GANACHE"; | ||
| ETHNetwork["MATIC"] = "MATIC"; | ||
| })(ETHNetwork || (ETHNetwork = {})); | ||
| let ContractType; | ||
| (function (ContractType) { | ||
| ContractType["UNKNOWN"] = "UNKNOWN"; | ||
| ContractType["ERC20_TOKEN"] = "ERC20_TOKEN"; | ||
| ContractType["ERC721_TOKEN"] = "ERC721_TOKEN"; | ||
| ContractType["ERC1155_TOKEN"] = "ERC1155_TOKEN"; | ||
| ContractType["META_ERC20_WRAPPER"] = "META_ERC20_WRAPPER"; | ||
| ContractType["NIFTYSWAP"] = "NIFTYSWAP"; | ||
| ContractType["BRIDGE"] = "BRIDGE"; | ||
| })(ContractType || (ContractType = {})); | ||
| let ContractCategory; | ||
| (function (ContractCategory) { | ||
| ContractCategory["UNKNOWN"] = "UNKNOWN"; | ||
| ContractCategory["COIN"] = "COIN"; | ||
| ContractCategory["COLLECTIBLE"] = "COLLECTIBLE"; | ||
| })(ContractCategory || (ContractCategory = {})); | ||
| let EventLogType; | ||
| (function (EventLogType) { | ||
| EventLogType["UNKNOWN"] = "UNKNOWN"; | ||
| EventLogType["BLOCK_ADDED"] = "BLOCK_ADDED"; | ||
| EventLogType["BLOCK_REMOVED"] = "BLOCK_REMOVED"; | ||
| EventLogType["BLOCK_UPDATED"] = "BLOCK_UPDATED"; | ||
| EventLogType["TXN_LOG"] = "TXN_LOG"; | ||
| })(EventLogType || (EventLogType = {})); | ||
| let ETHTxnStatus; | ||
| (function (ETHTxnStatus) { | ||
| ETHTxnStatus["UNKNOWN"] = "UNKNOWN"; | ||
| ETHTxnStatus["FAILED"] = "FAILED"; | ||
| ETHTxnStatus["PARTIALLY_FAILED"] = "PARTIALLY_FAILED"; | ||
| ETHTxnStatus["SENT"] = "SENT"; | ||
| ETHTxnStatus["REVERTED"] = "REVERTED"; | ||
| ETHTxnStatus["SUCCESS"] = "SUCCESS"; | ||
| ETHTxnStatus["FINAL"] = "FINAL"; | ||
| ETHTxnStatus["DROPPED"] = "DROPPED"; | ||
| })(ETHTxnStatus || (ETHTxnStatus = {})); | ||
| let OrderType; | ||
| (function (OrderType) { | ||
| OrderType["UNKNOWN"] = "UNKNOWN"; | ||
| OrderType["BUY"] = "BUY"; | ||
| OrderType["SELL"] = "SELL"; | ||
| })(OrderType || (OrderType = {})); | ||
| let OrderStatus; | ||
| (function (OrderStatus) { | ||
| OrderStatus["UNKNOWN"] = "UNKNOWN"; | ||
| OrderStatus["FAILED"] = "FAILED"; | ||
| OrderStatus["PENDING"] = "PENDING"; | ||
| OrderStatus["SUCCESS"] = "SUCCESS"; | ||
| OrderStatus["FINAL"] = "FINAL"; | ||
| })(OrderStatus || (OrderStatus = {})); | ||
| let SortOrder; | ||
@@ -127,30 +44,16 @@ | ||
| let TransferType; | ||
| (function (TransferType) { | ||
| TransferType["SEND"] = "SEND"; | ||
| TransferType["RECEIVE"] = "RECEIVE"; | ||
| TransferType["BRIDGE_DEPOSIT"] = "BRIDGE_DEPOSIT"; | ||
| TransferType["BRIDGE_WITHDRAW"] = "BRIDGE_WITHDRAW"; | ||
| TransferType["BURN"] = "BURN"; | ||
| TransferType["UNKNOWN"] = "UNKNOWN"; | ||
| })(TransferType || (TransferType = {})); | ||
| // | ||
| // Client | ||
| // | ||
| class ArcadeumAPI { | ||
| class API { | ||
| constructor(hostname, fetch) { | ||
| this.hostname = void 0; | ||
| this.fetch = void 0; | ||
| this.path = '/rpc/ArcadeumAPI/'; | ||
| this.path = '/rpc/API/'; | ||
| this.getAuthToken = (args, headers) => { | ||
| return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers)).then(res => { | ||
| this.ping = headers => { | ||
| return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| jwtToken: _data.jwtToken, | ||
| address: _data.address, | ||
| user: _data.user | ||
| status: _data.status | ||
| }; | ||
@@ -161,8 +64,7 @@ }); | ||
| this.getSession = headers => { | ||
| return this.fetch(this.url('GetSession'), createHTTPRequest({}, headers)).then(res => { | ||
| this.version = headers => { | ||
| return this.fetch(this.url('Version'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| address: _data.address, | ||
| user: _data.user | ||
| version: _data.version | ||
| }; | ||
@@ -173,4 +75,4 @@ }); | ||
| this.internalClaimAccessCode = (args, headers) => { | ||
| return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers)).then(res => { | ||
| this.runtimeStatus = headers => { | ||
| return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
@@ -184,7 +86,7 @@ return { | ||
| this.walletRecover = (args, headers) => { | ||
| return this.fetch(this.url('WalletRecover'), createHTTPRequest(args, headers)).then(res => { | ||
| this.getSequenceContext = headers => { | ||
| return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| encryptedWallet: _data.encryptedWallet | ||
| data: _data.data | ||
| }; | ||
@@ -195,2 +97,15 @@ }); | ||
| this.getAuthToken = (args, headers) => { | ||
| return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| jwtToken: _data.jwtToken, | ||
| address: _data.address, | ||
| user: _data.user | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.friendList = (args, headers) => { | ||
@@ -260,7 +175,7 @@ return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers)).then(res => { | ||
| this.getContract = (args, headers) => { | ||
| return this.fetch(this.url('GetContract'), createHTTPRequest(args, headers)).then(res => { | ||
| this.contractCall = (args, headers) => { | ||
| return this.fetch(this.url('ContractCall'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contract: _data.contract | ||
| returns: _data.returns | ||
| }; | ||
@@ -271,7 +186,7 @@ }); | ||
| this.getContractByAlias = (args, headers) => { | ||
| return this.fetch(this.url('GetContractByAlias'), createHTTPRequest(args, headers)).then(res => { | ||
| this.decodeContractCall = (args, headers) => { | ||
| return this.fetch(this.url('DecodeContractCall'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contract: _data.contract | ||
| call: _data.call | ||
| }; | ||
@@ -282,7 +197,7 @@ }); | ||
| this.getTokenContractsWithBalances = headers => { | ||
| return this.fetch(this.url('GetTokenContractsWithBalances'), createHTTPRequest({}, headers)).then(res => { | ||
| this.lookupContractCallSelectors = (args, headers) => { | ||
| return this.fetch(this.url('LookupContractCallSelectors'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contracts: _data.contracts | ||
| signatures: _data.signatures | ||
| }; | ||
@@ -293,199 +208,2 @@ }); | ||
| this.getTokenBalances = headers => { | ||
| return this.fetch(this.url('GetTokenBalances'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| balances: _data.balances | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.metaTxLogList = (args, headers) => { | ||
| return this.fetch(this.url('MetaTxLogList'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| logs: _data.logs | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.transactionHistory = (args, headers) => { | ||
| return this.fetch(this.url('TransactionHistory'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| transactions: _data.transactions | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.sentTransactions = (args, headers) => { | ||
| return this.fetch(this.url('SentTransactions'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| transactions: _data.transactions | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.accountEtherBalance = (args, headers) => { | ||
| return this.fetch(this.url('AccountEtherBalance'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| balance: _data.balance | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getAccountBalances = (args, headers) => { | ||
| return this.fetch(this.url('GetAccountBalances'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| balances: _data.balances | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getBalanceUpdates = (args, headers) => { | ||
| return this.fetch(this.url('GetBalanceUpdates'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: _data.page, | ||
| balances: _data.balances | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getTokenMetadata = (args, headers) => { | ||
| return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| tokenMetadata: _data.tokenMetadata | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.decodeTxnData = (args, headers) => { | ||
| return this.fetch(this.url('DecodeTxnData'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| res: _data.res | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getNiftyswapTokenSupply = (args, headers) => { | ||
| return this.fetch(this.url('GetNiftyswapTokenSupply'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| amounts: _data.amounts | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getNiftyswapUnitPrices = (args, headers) => { | ||
| return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| prices: _data.prices | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.sendMetaTxn = (args, headers) => { | ||
| return this.fetch(this.url('SendMetaTxn'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: _data.status, | ||
| txnHash: _data.txnHash | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getMetaTxnNonce = (args, headers) => { | ||
| return this.fetch(this.url('GetMetaTxnNonce'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| nonce: _data.nonce | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getSmartWalletContext = headers => { | ||
| return this.fetch(this.url('GetSmartWalletContext'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| data: _data.data | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getMetaTxnReceipt = (args, headers) => { | ||
| return this.fetch(this.url('GetMetaTxnReceipt'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| receipt: _data.receipt | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getChainID = headers => { | ||
| return this.fetch(this.url('GetChainID'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| chainID: _data.chainID | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.tokenFee = headers => { | ||
| return this.fetch(this.url('TokenFee'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| isFee: _data.isFee, | ||
| fee: _data.fee | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.updateMetaTxnGasLimits = (args, headers) => { | ||
| return this.fetch(this.url('UpdateMetaTxnGasLimits'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| payload: _data.payload | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getMetaTxnNetworkFeeOptions = (args, headers) => { | ||
| return this.fetch(this.url('GetMetaTxnNetworkFeeOptions'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| options: _data.options | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.getInviteInfo = headers => { | ||
@@ -501,4 +219,4 @@ return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => { | ||
| this.ping = headers => { | ||
| return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => { | ||
| this.internalClaimAccessCode = (args, headers) => { | ||
| return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
@@ -512,7 +230,7 @@ return { | ||
| this.version = headers => { | ||
| return this.fetch(this.url('Version'), createHTTPRequest({}, headers)).then(res => { | ||
| this.walletRecover = (args, headers) => { | ||
| return this.fetch(this.url('WalletRecover'), createHTTPRequest(args, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| version: _data.version | ||
| encryptedWallet: _data.encryptedWallet | ||
| }; | ||
@@ -523,12 +241,2 @@ }); | ||
| this.requirements = headers => { | ||
| return this.fetch(this.url('Requirements'), createHTTPRequest({}, headers)).then(res => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| reqs: _data.reqs | ||
| }; | ||
| }); | ||
| }); | ||
| }; | ||
| this.hostname = hostname; | ||
@@ -576,3 +284,3 @@ this.fetch = fetch; | ||
| class ArcadeumAPIClient extends ArcadeumAPI { | ||
| class SequenceAPIClient extends API { | ||
| constructor(hostname, jwtAuth) { | ||
@@ -601,2 +309,2 @@ super(hostname, fetch); | ||
| export { ArcadeumAPI, ArcadeumAPIClient, ChainStateProp, ContractCategory, ContractType, ETHNetwork, ETHTxnStatus, EventLogType, OrderStatus, OrderType, SortOrder, TransferType, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion }; | ||
| export { API, SequenceAPIClient, SortOrder, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion }; |
| export declare const WebRPCVersion = "v1"; | ||
| export declare const WebRPCSchemaVersion = "v0.3.0"; | ||
| export declare const WebRPCSchemaHash = "f7ddfd2b65953c3fc7717c519e3fb5f1b4b800e8"; | ||
| export declare enum ChainStateProp { | ||
| UNKNOWN = "UNKNOWN", | ||
| LAST_BLOCK_INDEXED = "LAST_BLOCK_INDEXED", | ||
| LAST_EVENT_LOG_PROCESSED = "LAST_EVENT_LOG_PROCESSED" | ||
| } | ||
| export declare enum ETHNetwork { | ||
| UNKNOWN = "UNKNOWN", | ||
| MAINNET = "MAINNET", | ||
| MORDEN = "MORDEN", | ||
| ROPSTEN = "ROPSTEN", | ||
| RINKEBY = "RINKEBY", | ||
| GOERLI = "GOERLI", | ||
| KOVAN = "KOVAN", | ||
| GANACHE = "GANACHE", | ||
| MATIC = "MATIC" | ||
| } | ||
| export declare enum ContractType { | ||
| UNKNOWN = "UNKNOWN", | ||
| ERC20_TOKEN = "ERC20_TOKEN", | ||
| ERC721_TOKEN = "ERC721_TOKEN", | ||
| ERC1155_TOKEN = "ERC1155_TOKEN", | ||
| META_ERC20_WRAPPER = "META_ERC20_WRAPPER", | ||
| NIFTYSWAP = "NIFTYSWAP", | ||
| BRIDGE = "BRIDGE" | ||
| } | ||
| export declare enum ContractCategory { | ||
| UNKNOWN = "UNKNOWN", | ||
| COIN = "COIN", | ||
| COLLECTIBLE = "COLLECTIBLE" | ||
| } | ||
| export declare enum EventLogType { | ||
| UNKNOWN = "UNKNOWN", | ||
| BLOCK_ADDED = "BLOCK_ADDED", | ||
| BLOCK_REMOVED = "BLOCK_REMOVED", | ||
| BLOCK_UPDATED = "BLOCK_UPDATED", | ||
| TXN_LOG = "TXN_LOG" | ||
| } | ||
| export declare enum ETHTxnStatus { | ||
| UNKNOWN = "UNKNOWN", | ||
| FAILED = "FAILED", | ||
| PARTIALLY_FAILED = "PARTIALLY_FAILED", | ||
| SENT = "SENT", | ||
| REVERTED = "REVERTED", | ||
| SUCCESS = "SUCCESS", | ||
| FINAL = "FINAL", | ||
| DROPPED = "DROPPED" | ||
| } | ||
| export declare enum OrderType { | ||
| UNKNOWN = "UNKNOWN", | ||
| BUY = "BUY", | ||
| SELL = "SELL" | ||
| } | ||
| export declare enum OrderStatus { | ||
| UNKNOWN = "UNKNOWN", | ||
| FAILED = "FAILED", | ||
| PENDING = "PENDING", | ||
| SUCCESS = "SUCCESS", | ||
| FINAL = "FINAL" | ||
| } | ||
| export declare const WebRPCSchemaVersion = "v0.4.0"; | ||
| export declare const WebRPCSchemaHash = "8e3575e965dc76a152d48e0b6660271db4d0c5be"; | ||
| export declare enum SortOrder { | ||
@@ -67,18 +8,26 @@ DESC = "DESC", | ||
| } | ||
| export declare enum TransferType { | ||
| SEND = "SEND", | ||
| RECEIVE = "RECEIVE", | ||
| BRIDGE_DEPOSIT = "BRIDGE_DEPOSIT", | ||
| BRIDGE_WITHDRAW = "BRIDGE_WITHDRAW", | ||
| BURN = "BURN", | ||
| UNKNOWN = "UNKNOWN" | ||
| export interface Version { | ||
| webrpcVersion: string; | ||
| schemaVersion: string; | ||
| schemaHash: string; | ||
| appVersion: string; | ||
| } | ||
| export interface ChainState { | ||
| id: number; | ||
| chainID: number; | ||
| prop: ChainStateProp; | ||
| value: number; | ||
| updatedAt: string; | ||
| createdAt: string; | ||
| export interface RuntimeStatus { | ||
| healthOK: boolean; | ||
| startTime: string; | ||
| uptime: number; | ||
| ver: string; | ||
| branch: string; | ||
| commitHash: string; | ||
| checks: RuntimeChecks; | ||
| } | ||
| export interface RuntimeChecks { | ||
| } | ||
| export interface SequenceContext { | ||
| factory: string; | ||
| mainModule: string; | ||
| mainModuleUpgradable: string; | ||
| guestModule: string; | ||
| utils: string; | ||
| } | ||
| export interface User { | ||
@@ -113,11 +62,5 @@ address: string; | ||
| } | ||
| export interface InviteResponse { | ||
| code: string; | ||
| url: string; | ||
| email?: string; | ||
| expiresAt?: string; | ||
| } | ||
| export interface InviteCode { | ||
| usesLeft: number; | ||
| ownerAccount?: string; | ||
| ownerAccount: string; | ||
| email?: string; | ||
@@ -137,147 +80,21 @@ url: string; | ||
| } | ||
| export interface Contract { | ||
| id: number; | ||
| alias: string; | ||
| contractAddress: string; | ||
| wrappedContractAddress: string; | ||
| type: ContractType; | ||
| network: ETHNetwork; | ||
| bytecodeHash: string; | ||
| trackUsersOnly: boolean; | ||
| category: ContractCategory; | ||
| name: string; | ||
| symbol: string; | ||
| decimals?: number; | ||
| logoURL: string; | ||
| website: string; | ||
| description: string; | ||
| ogImageURL: string; | ||
| originChainId: number; | ||
| originAddress: string; | ||
| hasMetadata?: boolean; | ||
| updatedAt: string; | ||
| createdAt: string; | ||
| export interface ContractCall { | ||
| signature: string; | ||
| function: string; | ||
| args: Array<ContractCallArg>; | ||
| } | ||
| export interface Token { | ||
| id: number; | ||
| contractID: number; | ||
| tokenID: string; | ||
| uri: string; | ||
| metadata: { | ||
| [key: string]: any; | ||
| }; | ||
| } | ||
| export interface TokenMetadata { | ||
| id: string; | ||
| export interface ContractCallArg { | ||
| name?: string; | ||
| description?: string; | ||
| image?: string; | ||
| decimals?: number; | ||
| properties?: any; | ||
| type: string; | ||
| value: any; | ||
| } | ||
| export interface Balance { | ||
| id: number; | ||
| contractAddress: string; | ||
| contractAlias: string; | ||
| accountAddress: string; | ||
| tokenID: string; | ||
| amountLatest: string; | ||
| amountConfirmed: string; | ||
| blockHash: string; | ||
| blockHeight: number; | ||
| tokenMetadata?: TokenMetadata; | ||
| updatedAt: string; | ||
| createdAt: string; | ||
| export interface Transaction { | ||
| delegateCall: boolean; | ||
| revertOnError: boolean; | ||
| gasLimit: string; | ||
| target: string; | ||
| value: string; | ||
| data: string; | ||
| call?: ContractCall; | ||
| } | ||
| export interface EventLog { | ||
| id: number; | ||
| ts: string; | ||
| chainID: number; | ||
| type: EventLogType; | ||
| blockNum: number; | ||
| blockHash: string; | ||
| contractAddress: string; | ||
| txnHash: string; | ||
| txnIndex: number; | ||
| txnLogIndex: number; | ||
| data: { | ||
| [key: string]: any; | ||
| }; | ||
| } | ||
| export interface EtherBalance { | ||
| accountAddress: string; | ||
| amountLatestWei: string; | ||
| amountConfirmedWei: string; | ||
| lastBlockHeight: number; | ||
| } | ||
| export interface Order { | ||
| orderID?: string; | ||
| txnHash?: string; | ||
| txnNonce?: string; | ||
| metaTxnID?: string; | ||
| txnStatus: ETHTxnStatus; | ||
| txnReceipt?: { | ||
| [key: string]: any; | ||
| }; | ||
| txnRevertReason: string; | ||
| accountAddress: string; | ||
| shopContractAddress: string; | ||
| assetContractAddress: string; | ||
| baseContractAddress: string; | ||
| orderType: OrderType; | ||
| orderStatus: OrderStatus; | ||
| tokenIds: Array<string>; | ||
| amounts: Array<string>; | ||
| unitPrices: Array<string>; | ||
| subtotalPrice: string; | ||
| metatxFee: string; | ||
| brokerFee: string; | ||
| totalPrice: string; | ||
| gasUsed: number; | ||
| gasFeeWei: string; | ||
| updatedAt: string; | ||
| createdAt: string; | ||
| } | ||
| export interface MetaTxLog { | ||
| id: number; | ||
| txnHash?: string; | ||
| txnNonce?: string; | ||
| metaTxnID?: string; | ||
| txnStatus: ETHTxnStatus; | ||
| txnRevertReason: string; | ||
| txnArgs: { | ||
| [key: string]: any; | ||
| }; | ||
| txnReceipt?: { | ||
| [key: string]: any; | ||
| }; | ||
| gasLimit: number; | ||
| gasPrice: string; | ||
| gasUsed: number; | ||
| updatedAt: string; | ||
| createdAt: string; | ||
| } | ||
| export interface MetaTxEntry { | ||
| id: number; | ||
| metaTxnID: string; | ||
| txnStatus: ETHTxnStatus; | ||
| txnRevertReason: string; | ||
| index: number; | ||
| logs?: Array<any>; | ||
| updatedAt: string; | ||
| createdAt: string; | ||
| } | ||
| export interface Requirement { | ||
| app: string; | ||
| version: string; | ||
| etc: { | ||
| [key: string]: string; | ||
| }; | ||
| } | ||
| export interface Version { | ||
| webrpcVersion: string; | ||
| schemaVersion: string; | ||
| schemaHash: string; | ||
| appVersion: string; | ||
| } | ||
| export interface Page { | ||
@@ -296,205 +113,41 @@ pageSize?: number; | ||
| } | ||
| export interface WalletConfig { | ||
| address: string; | ||
| signers: Array<WalletSigner>; | ||
| threshold: number; | ||
| chainId?: number; | ||
| export interface API { | ||
| ping(headers?: object): Promise<PingReturn>; | ||
| version(headers?: object): Promise<VersionReturn>; | ||
| runtimeStatus(headers?: object): Promise<RuntimeStatusReturn>; | ||
| getSequenceContext(headers?: object): Promise<GetSequenceContextReturn>; | ||
| getAuthToken(args: GetAuthTokenArgs, headers?: object): Promise<GetAuthTokenReturn>; | ||
| friendList(args: FriendListArgs, headers?: object): Promise<FriendListReturn>; | ||
| getFriendByAddress(args: GetFriendByAddressArgs, headers?: object): Promise<GetFriendByAddressReturn>; | ||
| searchFriends(args: SearchFriendsArgs, headers?: object): Promise<SearchFriendsReturn>; | ||
| addFriend(args: AddFriendArgs, headers?: object): Promise<AddFriendReturn>; | ||
| updateFriendNickname(args: UpdateFriendNicknameArgs, headers?: object): Promise<UpdateFriendNicknameReturn>; | ||
| removeFriend(args: RemoveFriendArgs, headers?: object): Promise<RemoveFriendReturn>; | ||
| contractCall(args: ContractCallArgs, headers?: object): Promise<ContractCallReturn>; | ||
| decodeContractCall(args: DecodeContractCallArgs, headers?: object): Promise<DecodeContractCallReturn>; | ||
| lookupContractCallSelectors(args: LookupContractCallSelectorsArgs, headers?: object): Promise<LookupContractCallSelectorsReturn>; | ||
| getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>; | ||
| internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>; | ||
| walletRecover(args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn>; | ||
| } | ||
| export interface WalletSigner { | ||
| address: string; | ||
| weight: number; | ||
| export interface PingArgs { | ||
| } | ||
| export interface FeeOption { | ||
| token: FeeToken; | ||
| to: string; | ||
| value: string; | ||
| gasLimit: number; | ||
| export interface PingReturn { | ||
| status: boolean; | ||
| } | ||
| export interface FeeToken { | ||
| chainId: number; | ||
| name: string; | ||
| symbol: string; | ||
| type: ContractType; | ||
| decimals?: number; | ||
| logoURL: string; | ||
| contractAddress?: string; | ||
| originAddress?: string; | ||
| tokenID?: string; | ||
| export interface VersionArgs { | ||
| } | ||
| export interface GasReceipt { | ||
| gasFee: string; | ||
| gasLimit: Array<string>; | ||
| export interface VersionReturn { | ||
| version: Version; | ||
| } | ||
| export interface MetaTxn { | ||
| contract: string; | ||
| input: string; | ||
| digest?: string; | ||
| export interface RuntimeStatusArgs { | ||
| } | ||
| export interface TxnObj { | ||
| to: string; | ||
| objs: Array<TxnObj>; | ||
| txnStatus: string; | ||
| txnRevertReason: string; | ||
| logs?: Array<any>; | ||
| export interface RuntimeStatusReturn { | ||
| status: RuntimeStatus; | ||
| } | ||
| export interface MetaTxnReceipt { | ||
| id: string; | ||
| status: string; | ||
| revertReason: string; | ||
| gasUsed: number; | ||
| txnReceipt: string; | ||
| batch: TxnObj; | ||
| export interface GetSequenceContextArgs { | ||
| } | ||
| export interface SmartWalletContext { | ||
| factory: string; | ||
| module: string; | ||
| guestModule: string; | ||
| export interface GetSequenceContextReturn { | ||
| data: SequenceContext; | ||
| } | ||
| export interface TokenTransfer { | ||
| recipientAddress: string; | ||
| tokenID: string; | ||
| tokenAmount: string; | ||
| } | ||
| export interface GetNiftyswapUnitPricesRequest { | ||
| orderType: OrderType; | ||
| ids: Array<string>; | ||
| amounts: Array<string>; | ||
| } | ||
| export interface RegisterContractRequest { | ||
| type: ContractType; | ||
| contractAddress: string; | ||
| contractAlias: string; | ||
| network: ETHNetwork; | ||
| name: string; | ||
| symbol: string; | ||
| logoURL: string; | ||
| website: string; | ||
| description: string; | ||
| ogImageURL: string; | ||
| originChainId: number; | ||
| originAddress: string; | ||
| category: ContractCategory; | ||
| decimals?: number; | ||
| } | ||
| export interface Transaction { | ||
| txnHash?: string; | ||
| blockNumber: number; | ||
| chainId: number; | ||
| metaTxnID?: string; | ||
| transfers?: Array<TxnLogTransfer>; | ||
| entries?: TxnObj; | ||
| users?: { | ||
| [key: string]: TxnLogUser; | ||
| }; | ||
| contracts?: { | ||
| [key: string]: Contract; | ||
| }; | ||
| tokenMetadata?: { | ||
| [key: string]: { | ||
| [key: string]: TokenMetadata; | ||
| }; | ||
| }; | ||
| timestamp: string; | ||
| } | ||
| export interface TxnLogTransfer { | ||
| transferType: TransferType; | ||
| contractAddress: string; | ||
| from: string; | ||
| to: string; | ||
| ids: Array<string>; | ||
| amounts: Array<string>; | ||
| } | ||
| export interface TxnLogUser { | ||
| username: string; | ||
| } | ||
| export interface TokenBalance { | ||
| contractAddress: string; | ||
| contractAlias: string; | ||
| logoURL: string; | ||
| originChainId: number; | ||
| originAddress: string; | ||
| website: string; | ||
| contractType: ContractType; | ||
| name: string; | ||
| symbol: string; | ||
| category: ContractCategory; | ||
| decimals?: number; | ||
| amountLatest: string; | ||
| amountConfirmed: string; | ||
| } | ||
| export interface MetaTxSigner { | ||
| address: string; | ||
| weight: number; | ||
| } | ||
| export interface MetaTxSig { | ||
| address: string; | ||
| signature: string; | ||
| digest?: string; | ||
| } | ||
| export interface WalletConfigImage { | ||
| imageHash: string; | ||
| threshold: number; | ||
| signers: Array<MetaTxSigner>; | ||
| } | ||
| export interface WalletImage { | ||
| walletAddress: string; | ||
| imageHash: string; | ||
| } | ||
| export interface TransactionHistoryFilter { | ||
| users?: Array<string>; | ||
| contractHandles?: Array<string>; | ||
| transactionHashes?: Array<string>; | ||
| fromBlock?: number; | ||
| toBlock?: number; | ||
| } | ||
| export interface SentTransactionsFilter { | ||
| pending: boolean; | ||
| failed: boolean; | ||
| } | ||
| export interface TxnData { | ||
| to: string; | ||
| methodName: string; | ||
| args: { | ||
| [key: string]: any; | ||
| }; | ||
| objs: Array<TxnData>; | ||
| } | ||
| export interface ArcadeumAPI { | ||
| getAuthToken(args: GetAuthTokenArgs, headers?: object): Promise<GetAuthTokenReturn>; | ||
| getSession(headers?: object): Promise<GetSessionReturn>; | ||
| internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>; | ||
| walletRecover(args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn>; | ||
| friendList(args: FriendListArgs, headers?: object): Promise<FriendListReturn>; | ||
| getFriendByAddress(args: GetFriendByAddressArgs, headers?: object): Promise<GetFriendByAddressReturn>; | ||
| searchFriends(args: SearchFriendsArgs, headers?: object): Promise<SearchFriendsReturn>; | ||
| addFriend(args: AddFriendArgs, headers?: object): Promise<AddFriendReturn>; | ||
| updateFriendNickname(args: UpdateFriendNicknameArgs, headers?: object): Promise<UpdateFriendNicknameReturn>; | ||
| removeFriend(args: RemoveFriendArgs, headers?: object): Promise<RemoveFriendReturn>; | ||
| getContract(args: GetContractArgs, headers?: object): Promise<GetContractReturn>; | ||
| getContractByAlias(args: GetContractByAliasArgs, headers?: object): Promise<GetContractByAliasReturn>; | ||
| getTokenContractsWithBalances(headers?: object): Promise<GetTokenContractsWithBalancesReturn>; | ||
| getTokenBalances(headers?: object): Promise<GetTokenBalancesReturn>; | ||
| metaTxLogList(args: MetaTxLogListArgs, headers?: object): Promise<MetaTxLogListReturn>; | ||
| transactionHistory(args: TransactionHistoryArgs, headers?: object): Promise<TransactionHistoryReturn>; | ||
| sentTransactions(args: SentTransactionsArgs, headers?: object): Promise<SentTransactionsReturn>; | ||
| accountEtherBalance(args: AccountEtherBalanceArgs, headers?: object): Promise<AccountEtherBalanceReturn>; | ||
| getAccountBalances(args: GetAccountBalancesArgs, headers?: object): Promise<GetAccountBalancesReturn>; | ||
| getBalanceUpdates(args: GetBalanceUpdatesArgs, headers?: object): Promise<GetBalanceUpdatesReturn>; | ||
| getTokenMetadata(args: GetTokenMetadataArgs, headers?: object): Promise<GetTokenMetadataReturn>; | ||
| decodeTxnData(args: DecodeTxnDataArgs, headers?: object): Promise<DecodeTxnDataReturn>; | ||
| getNiftyswapTokenSupply(args: GetNiftyswapTokenSupplyArgs, headers?: object): Promise<GetNiftyswapTokenSupplyReturn>; | ||
| getNiftyswapUnitPrices(args: GetNiftyswapUnitPricesArgs, headers?: object): Promise<GetNiftyswapUnitPricesReturn>; | ||
| sendMetaTxn(args: SendMetaTxnArgs, headers?: object): Promise<SendMetaTxnReturn>; | ||
| getMetaTxnNonce(args: GetMetaTxnNonceArgs, headers?: object): Promise<GetMetaTxnNonceReturn>; | ||
| getSmartWalletContext(headers?: object): Promise<GetSmartWalletContextReturn>; | ||
| getMetaTxnReceipt(args: GetMetaTxnReceiptArgs, headers?: object): Promise<GetMetaTxnReceiptReturn>; | ||
| getChainID(headers?: object): Promise<GetChainIDReturn>; | ||
| tokenFee(headers?: object): Promise<TokenFeeReturn>; | ||
| updateMetaTxnGasLimits(args: UpdateMetaTxnGasLimitsArgs, headers?: object): Promise<UpdateMetaTxnGasLimitsReturn>; | ||
| getMetaTxnNetworkFeeOptions(args: GetMetaTxnNetworkFeeOptionsArgs, headers?: object): Promise<GetMetaTxnNetworkFeeOptionsReturn>; | ||
| getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>; | ||
| ping(headers?: object): Promise<PingReturn>; | ||
| version(headers?: object): Promise<VersionReturn>; | ||
| requirements(headers?: object): Promise<RequirementsReturn>; | ||
| } | ||
| export interface GetAuthTokenArgs { | ||
@@ -509,22 +162,2 @@ ewtString: string; | ||
| } | ||
| export interface GetSessionArgs { | ||
| } | ||
| export interface GetSessionReturn { | ||
| address: string; | ||
| user?: User; | ||
| } | ||
| export interface InternalClaimAccessCodeArgs { | ||
| address: string; | ||
| accessCode: string; | ||
| } | ||
| export interface InternalClaimAccessCodeReturn { | ||
| status: boolean; | ||
| } | ||
| export interface WalletRecoverArgs { | ||
| username: string; | ||
| secretHash: string; | ||
| } | ||
| export interface WalletRecoverReturn { | ||
| encryptedWallet: string; | ||
| } | ||
| export interface FriendListArgs { | ||
@@ -572,148 +205,24 @@ page?: Page; | ||
| } | ||
| export interface GetContractArgs { | ||
| contractHandle: string; | ||
| export interface ContractCallArgs { | ||
| chainID: string; | ||
| contract: string; | ||
| inputExpr: string; | ||
| outputExpr: string; | ||
| args: Array<string>; | ||
| } | ||
| export interface GetContractReturn { | ||
| contract: Contract; | ||
| export interface ContractCallReturn { | ||
| returns: Array<string>; | ||
| } | ||
| export interface GetContractByAliasArgs { | ||
| alias: string; | ||
| export interface DecodeContractCallArgs { | ||
| callData: string; | ||
| } | ||
| export interface GetContractByAliasReturn { | ||
| contract: Contract; | ||
| export interface DecodeContractCallReturn { | ||
| call: ContractCall; | ||
| } | ||
| export interface GetTokenContractsWithBalancesArgs { | ||
| export interface LookupContractCallSelectorsArgs { | ||
| selectors: Array<string>; | ||
| } | ||
| export interface GetTokenContractsWithBalancesReturn { | ||
| contracts: Array<Contract>; | ||
| export interface LookupContractCallSelectorsReturn { | ||
| signatures: Array<Array<string>>; | ||
| } | ||
| export interface GetTokenBalancesArgs { | ||
| } | ||
| export interface GetTokenBalancesReturn { | ||
| balances: Array<TokenBalance>; | ||
| } | ||
| export interface MetaTxLogListArgs { | ||
| page?: Page; | ||
| } | ||
| export interface MetaTxLogListReturn { | ||
| page: Page; | ||
| logs: Array<MetaTxLog>; | ||
| } | ||
| export interface TransactionHistoryArgs { | ||
| filter: TransactionHistoryFilter; | ||
| page?: Page; | ||
| } | ||
| export interface TransactionHistoryReturn { | ||
| page: Page; | ||
| transactions: Array<Transaction>; | ||
| } | ||
| export interface SentTransactionsArgs { | ||
| filter: SentTransactionsFilter; | ||
| page?: Page; | ||
| } | ||
| export interface SentTransactionsReturn { | ||
| page: Page; | ||
| transactions: Array<Transaction>; | ||
| } | ||
| export interface AccountEtherBalanceArgs { | ||
| accountAddress: string; | ||
| } | ||
| export interface AccountEtherBalanceReturn { | ||
| balance: EtherBalance; | ||
| } | ||
| export interface GetAccountBalancesArgs { | ||
| contractHandle: string; | ||
| accountAddress: string; | ||
| includeMetadata?: boolean; | ||
| } | ||
| export interface GetAccountBalancesReturn { | ||
| status: boolean; | ||
| balances: Array<Balance>; | ||
| } | ||
| export interface GetBalanceUpdatesArgs { | ||
| contractHandle: string; | ||
| lastBalanceID: number; | ||
| page?: Page; | ||
| } | ||
| export interface GetBalanceUpdatesReturn { | ||
| page?: Page; | ||
| balances: Array<Balance>; | ||
| } | ||
| export interface GetTokenMetadataArgs { | ||
| contractHandle: string; | ||
| tokenIDs: Array<string>; | ||
| } | ||
| export interface GetTokenMetadataReturn { | ||
| tokenMetadata: Array<TokenMetadata>; | ||
| } | ||
| export interface DecodeTxnDataArgs { | ||
| input: string; | ||
| } | ||
| export interface DecodeTxnDataReturn { | ||
| res: TxnData; | ||
| } | ||
| export interface GetNiftyswapTokenSupplyArgs { | ||
| shopContractHandle: string; | ||
| ids: Array<string>; | ||
| } | ||
| export interface GetNiftyswapTokenSupplyReturn { | ||
| amounts: Array<string>; | ||
| } | ||
| export interface GetNiftyswapUnitPricesArgs { | ||
| shopContractHandle: string; | ||
| req: GetNiftyswapUnitPricesRequest; | ||
| } | ||
| export interface GetNiftyswapUnitPricesReturn { | ||
| prices: Array<string>; | ||
| } | ||
| export interface SendMetaTxnArgs { | ||
| call: MetaTxn; | ||
| } | ||
| export interface SendMetaTxnReturn { | ||
| status: boolean; | ||
| txnHash: string; | ||
| } | ||
| export interface GetMetaTxnNonceArgs { | ||
| walletContractAddress: string; | ||
| space?: string; | ||
| } | ||
| export interface GetMetaTxnNonceReturn { | ||
| nonce: string; | ||
| } | ||
| export interface GetSmartWalletContextArgs { | ||
| } | ||
| export interface GetSmartWalletContextReturn { | ||
| data: SmartWalletContext; | ||
| } | ||
| export interface GetMetaTxnReceiptArgs { | ||
| metaTxID: string; | ||
| } | ||
| export interface GetMetaTxnReceiptReturn { | ||
| receipt: MetaTxnReceipt; | ||
| } | ||
| export interface GetChainIDArgs { | ||
| } | ||
| export interface GetChainIDReturn { | ||
| chainID: number; | ||
| } | ||
| export interface TokenFeeArgs { | ||
| } | ||
| export interface TokenFeeReturn { | ||
| isFee: boolean; | ||
| fee: string; | ||
| } | ||
| export interface UpdateMetaTxnGasLimitsArgs { | ||
| walletAddress: string; | ||
| payload: string; | ||
| } | ||
| export interface UpdateMetaTxnGasLimitsReturn { | ||
| payload: string; | ||
| } | ||
| export interface GetMetaTxnNetworkFeeOptionsArgs { | ||
| walletConfig: WalletConfig; | ||
| payload: string; | ||
| } | ||
| export interface GetMetaTxnNetworkFeeOptionsReturn { | ||
| options: Array<FeeOption>; | ||
| } | ||
| export interface GetInviteInfoArgs { | ||
@@ -724,18 +233,17 @@ } | ||
| } | ||
| export interface PingArgs { | ||
| export interface InternalClaimAccessCodeArgs { | ||
| address: string; | ||
| accessCode: string; | ||
| } | ||
| export interface PingReturn { | ||
| export interface InternalClaimAccessCodeReturn { | ||
| status: boolean; | ||
| } | ||
| export interface VersionArgs { | ||
| export interface WalletRecoverArgs { | ||
| username: string; | ||
| secretHash: string; | ||
| } | ||
| export interface VersionReturn { | ||
| version: Version; | ||
| export interface WalletRecoverReturn { | ||
| encryptedWallet: string; | ||
| } | ||
| export interface RequirementsArgs { | ||
| } | ||
| export interface RequirementsReturn { | ||
| reqs: Array<Requirement>; | ||
| } | ||
| export declare class ArcadeumAPI implements ArcadeumAPI { | ||
| export declare class API implements API { | ||
| protected hostname: string; | ||
@@ -746,6 +254,7 @@ protected fetch: Fetch; | ||
| private url; | ||
| ping: (headers?: object | undefined) => Promise<PingReturn>; | ||
| version: (headers?: object | undefined) => Promise<VersionReturn>; | ||
| runtimeStatus: (headers?: object | undefined) => Promise<RuntimeStatusReturn>; | ||
| getSequenceContext: (headers?: object | undefined) => Promise<GetSequenceContextReturn>; | ||
| getAuthToken: (args: GetAuthTokenArgs, headers?: object | undefined) => Promise<GetAuthTokenReturn>; | ||
| getSession: (headers?: object | undefined) => Promise<GetSessionReturn>; | ||
| internalClaimAccessCode: (args: InternalClaimAccessCodeArgs, headers?: object | undefined) => Promise<InternalClaimAccessCodeReturn>; | ||
| walletRecover: (args: WalletRecoverArgs, headers?: object | undefined) => Promise<WalletRecoverReturn>; | ||
| friendList: (args: FriendListArgs, headers?: object | undefined) => Promise<FriendListReturn>; | ||
@@ -757,28 +266,8 @@ getFriendByAddress: (args: GetFriendByAddressArgs, headers?: object | undefined) => Promise<GetFriendByAddressReturn>; | ||
| removeFriend: (args: RemoveFriendArgs, headers?: object | undefined) => Promise<RemoveFriendReturn>; | ||
| getContract: (args: GetContractArgs, headers?: object | undefined) => Promise<GetContractReturn>; | ||
| getContractByAlias: (args: GetContractByAliasArgs, headers?: object | undefined) => Promise<GetContractByAliasReturn>; | ||
| getTokenContractsWithBalances: (headers?: object | undefined) => Promise<GetTokenContractsWithBalancesReturn>; | ||
| getTokenBalances: (headers?: object | undefined) => Promise<GetTokenBalancesReturn>; | ||
| metaTxLogList: (args: MetaTxLogListArgs, headers?: object | undefined) => Promise<MetaTxLogListReturn>; | ||
| transactionHistory: (args: TransactionHistoryArgs, headers?: object | undefined) => Promise<TransactionHistoryReturn>; | ||
| sentTransactions: (args: SentTransactionsArgs, headers?: object | undefined) => Promise<SentTransactionsReturn>; | ||
| accountEtherBalance: (args: AccountEtherBalanceArgs, headers?: object | undefined) => Promise<AccountEtherBalanceReturn>; | ||
| getAccountBalances: (args: GetAccountBalancesArgs, headers?: object | undefined) => Promise<GetAccountBalancesReturn>; | ||
| getBalanceUpdates: (args: GetBalanceUpdatesArgs, headers?: object | undefined) => Promise<GetBalanceUpdatesReturn>; | ||
| getTokenMetadata: (args: GetTokenMetadataArgs, headers?: object | undefined) => Promise<GetTokenMetadataReturn>; | ||
| decodeTxnData: (args: DecodeTxnDataArgs, headers?: object | undefined) => Promise<DecodeTxnDataReturn>; | ||
| getNiftyswapTokenSupply: (args: GetNiftyswapTokenSupplyArgs, headers?: object | undefined) => Promise<GetNiftyswapTokenSupplyReturn>; | ||
| getNiftyswapUnitPrices: (args: GetNiftyswapUnitPricesArgs, headers?: object | undefined) => Promise<GetNiftyswapUnitPricesReturn>; | ||
| sendMetaTxn: (args: SendMetaTxnArgs, headers?: object | undefined) => Promise<SendMetaTxnReturn>; | ||
| getMetaTxnNonce: (args: GetMetaTxnNonceArgs, headers?: object | undefined) => Promise<GetMetaTxnNonceReturn>; | ||
| getSmartWalletContext: (headers?: object | undefined) => Promise<GetSmartWalletContextReturn>; | ||
| getMetaTxnReceipt: (args: GetMetaTxnReceiptArgs, headers?: object | undefined) => Promise<GetMetaTxnReceiptReturn>; | ||
| getChainID: (headers?: object | undefined) => Promise<GetChainIDReturn>; | ||
| tokenFee: (headers?: object | undefined) => Promise<TokenFeeReturn>; | ||
| updateMetaTxnGasLimits: (args: UpdateMetaTxnGasLimitsArgs, headers?: object | undefined) => Promise<UpdateMetaTxnGasLimitsReturn>; | ||
| getMetaTxnNetworkFeeOptions: (args: GetMetaTxnNetworkFeeOptionsArgs, headers?: object | undefined) => Promise<GetMetaTxnNetworkFeeOptionsReturn>; | ||
| contractCall: (args: ContractCallArgs, headers?: object | undefined) => Promise<ContractCallReturn>; | ||
| decodeContractCall: (args: DecodeContractCallArgs, headers?: object | undefined) => Promise<DecodeContractCallReturn>; | ||
| lookupContractCallSelectors: (args: LookupContractCallSelectorsArgs, headers?: object | undefined) => Promise<LookupContractCallSelectorsReturn>; | ||
| getInviteInfo: (headers?: object | undefined) => Promise<GetInviteInfoReturn>; | ||
| ping: (headers?: object | undefined) => Promise<PingReturn>; | ||
| version: (headers?: object | undefined) => Promise<VersionReturn>; | ||
| requirements: (headers?: object | undefined) => Promise<RequirementsReturn>; | ||
| internalClaimAccessCode: (args: InternalClaimAccessCodeArgs, headers?: object | undefined) => Promise<InternalClaimAccessCodeReturn>; | ||
| walletRecover: (args: WalletRecoverArgs, headers?: object | undefined) => Promise<WalletRecoverReturn>; | ||
| } | ||
@@ -785,0 +274,0 @@ export interface WebRPCError extends Error { |
| export * from './api.gen'; | ||
| import { ArcadeumAPI as BaseArcadeumAPI } from './api.gen'; | ||
| export declare class ArcadeumAPIClient extends BaseArcadeumAPI { | ||
| import { API as BaseSequenceAPI } from './api.gen'; | ||
| export declare class SequenceAPIClient extends BaseSequenceAPI { | ||
| jwtAuth?: string | undefined; | ||
@@ -5,0 +5,0 @@ constructor(hostname: string, jwtAuth?: string | undefined); |
+2
-2
| { | ||
| "name": "@0xsequence/api", | ||
| "version": "0.28.0", | ||
| "version": "0.29.0", | ||
| "description": "api sub-package for Sequence", | ||
@@ -16,3 +16,3 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api", | ||
| "dependencies": { | ||
| "cross-fetch": "^3.0.6" | ||
| "cross-fetch": "^3.1.4" | ||
| }, | ||
@@ -19,0 +19,0 @@ "peerDependencies": {}, |
+147
-917
| /* eslint-disable */ | ||
| // arcadeum-api v0.3.0 f7ddfd2b65953c3fc7717c519e3fb5f1b4b800e8 | ||
| // sequence-api v0.4.0 8e3575e965dc76a152d48e0b6660271db4d0c5be | ||
| // -- | ||
@@ -11,6 +11,6 @@ // This file has been generated by https://github.com/webrpc/webrpc using gen/typescript | ||
| // Schema version of your RIDL schema | ||
| export const WebRPCSchemaVersion = "v0.3.0" | ||
| export const WebRPCSchemaVersion = "v0.4.0" | ||
| // Schema hash generated from your RIDL schema | ||
| export const WebRPCSchemaHash = "f7ddfd2b65953c3fc7717c519e3fb5f1b4b800e8" | ||
| export const WebRPCSchemaHash = "8e3575e965dc76a152d48e0b6660271db4d0c5be" | ||
@@ -21,92 +21,35 @@ | ||
| // | ||
| export enum ChainStateProp { | ||
| UNKNOWN = 'UNKNOWN', | ||
| LAST_BLOCK_INDEXED = 'LAST_BLOCK_INDEXED', | ||
| LAST_EVENT_LOG_PROCESSED = 'LAST_EVENT_LOG_PROCESSED' | ||
| export enum SortOrder { | ||
| DESC = 'DESC', | ||
| ASC = 'ASC' | ||
| } | ||
| export enum ETHNetwork { | ||
| UNKNOWN = 'UNKNOWN', | ||
| MAINNET = 'MAINNET', | ||
| MORDEN = 'MORDEN', | ||
| ROPSTEN = 'ROPSTEN', | ||
| RINKEBY = 'RINKEBY', | ||
| GOERLI = 'GOERLI', | ||
| KOVAN = 'KOVAN', | ||
| GANACHE = 'GANACHE', | ||
| MATIC = 'MATIC' | ||
| export interface Version { | ||
| webrpcVersion: string | ||
| schemaVersion: string | ||
| schemaHash: string | ||
| appVersion: string | ||
| } | ||
| export enum ContractType { | ||
| UNKNOWN = 'UNKNOWN', | ||
| ERC20_TOKEN = 'ERC20_TOKEN', | ||
| ERC721_TOKEN = 'ERC721_TOKEN', | ||
| ERC1155_TOKEN = 'ERC1155_TOKEN', | ||
| META_ERC20_WRAPPER = 'META_ERC20_WRAPPER', | ||
| NIFTYSWAP = 'NIFTYSWAP', | ||
| BRIDGE = 'BRIDGE' | ||
| export interface RuntimeStatus { | ||
| healthOK: boolean | ||
| startTime: string | ||
| uptime: number | ||
| ver: string | ||
| branch: string | ||
| commitHash: string | ||
| checks: RuntimeChecks | ||
| } | ||
| export enum ContractCategory { | ||
| UNKNOWN = 'UNKNOWN', | ||
| COIN = 'COIN', | ||
| COLLECTIBLE = 'COLLECTIBLE' | ||
| export interface RuntimeChecks { | ||
| } | ||
| export enum EventLogType { | ||
| UNKNOWN = 'UNKNOWN', | ||
| BLOCK_ADDED = 'BLOCK_ADDED', | ||
| BLOCK_REMOVED = 'BLOCK_REMOVED', | ||
| BLOCK_UPDATED = 'BLOCK_UPDATED', | ||
| TXN_LOG = 'TXN_LOG' | ||
| export interface SequenceContext { | ||
| factory: string | ||
| mainModule: string | ||
| mainModuleUpgradable: string | ||
| guestModule: string | ||
| utils: string | ||
| } | ||
| export enum ETHTxnStatus { | ||
| UNKNOWN = 'UNKNOWN', | ||
| FAILED = 'FAILED', | ||
| PARTIALLY_FAILED = 'PARTIALLY_FAILED', | ||
| SENT = 'SENT', | ||
| REVERTED = 'REVERTED', | ||
| SUCCESS = 'SUCCESS', | ||
| FINAL = 'FINAL', | ||
| DROPPED = 'DROPPED' | ||
| } | ||
| export enum OrderType { | ||
| UNKNOWN = 'UNKNOWN', | ||
| BUY = 'BUY', | ||
| SELL = 'SELL' | ||
| } | ||
| export enum OrderStatus { | ||
| UNKNOWN = 'UNKNOWN', | ||
| FAILED = 'FAILED', | ||
| PENDING = 'PENDING', | ||
| SUCCESS = 'SUCCESS', | ||
| FINAL = 'FINAL' | ||
| } | ||
| export enum SortOrder { | ||
| DESC = 'DESC', | ||
| ASC = 'ASC' | ||
| } | ||
| export enum TransferType { | ||
| SEND = 'SEND', | ||
| RECEIVE = 'RECEIVE', | ||
| BRIDGE_DEPOSIT = 'BRIDGE_DEPOSIT', | ||
| BRIDGE_WITHDRAW = 'BRIDGE_WITHDRAW', | ||
| BURN = 'BURN', | ||
| UNKNOWN = 'UNKNOWN' | ||
| } | ||
| export interface ChainState { | ||
| id: number | ||
| chainID: number | ||
| prop: ChainStateProp | ||
| value: number | ||
| updatedAt: string | ||
| createdAt: string | ||
| } | ||
| export interface User { | ||
@@ -146,9 +89,2 @@ address: string | ||
| export interface InviteResponse { | ||
| code: string | ||
| url: string | ||
| email?: string | ||
| expiresAt?: string | ||
| } | ||
| export interface InviteCode { | ||
@@ -158,3 +94,3 @@ | ||
| usesLeft: number | ||
| ownerAccount?: string | ||
| ownerAccount: string | ||
| email?: string | ||
@@ -178,148 +114,24 @@ url: string | ||
| export interface Contract { | ||
| id: number | ||
| alias: string | ||
| contractAddress: string | ||
| wrappedContractAddress: string | ||
| type: ContractType | ||
| network: ETHNetwork | ||
| bytecodeHash: string | ||
| trackUsersOnly: boolean | ||
| category: ContractCategory | ||
| name: string | ||
| symbol: string | ||
| decimals?: number | ||
| logoURL: string | ||
| website: string | ||
| description: string | ||
| ogImageURL: string | ||
| originChainId: number | ||
| originAddress: string | ||
| hasMetadata?: boolean | ||
| updatedAt: string | ||
| createdAt: string | ||
| export interface ContractCall { | ||
| signature: string | ||
| function: string | ||
| args: Array<ContractCallArg> | ||
| } | ||
| export interface Token { | ||
| id: number | ||
| contractID: number | ||
| tokenID: string | ||
| uri: string | ||
| metadata: {[key: string]: any} | ||
| } | ||
| export interface TokenMetadata { | ||
| id: string | ||
| export interface ContractCallArg { | ||
| name?: string | ||
| description?: string | ||
| image?: string | ||
| decimals?: number | ||
| properties?: any | ||
| type: string | ||
| value: any | ||
| } | ||
| export interface Balance { | ||
| id: number | ||
| contractAddress: string | ||
| contractAlias: string | ||
| accountAddress: string | ||
| tokenID: string | ||
| amountLatest: string | ||
| amountConfirmed: string | ||
| blockHash: string | ||
| blockHeight: number | ||
| tokenMetadata?: TokenMetadata | ||
| updatedAt: string | ||
| createdAt: string | ||
| export interface Transaction { | ||
| delegateCall: boolean | ||
| revertOnError: boolean | ||
| gasLimit: string | ||
| target: string | ||
| value: string | ||
| data: string | ||
| call?: ContractCall | ||
| } | ||
| export interface EventLog { | ||
| id: number | ||
| ts: string | ||
| chainID: number | ||
| type: EventLogType | ||
| blockNum: number | ||
| blockHash: string | ||
| contractAddress: string | ||
| txnHash: string | ||
| txnIndex: number | ||
| txnLogIndex: number | ||
| data: {[key: string]: any} | ||
| } | ||
| export interface EtherBalance { | ||
| accountAddress: string | ||
| amountLatestWei: string | ||
| amountConfirmedWei: string | ||
| lastBlockHeight: number | ||
| } | ||
| export interface Order { | ||
| orderID?: string | ||
| txnHash?: string | ||
| txnNonce?: string | ||
| metaTxnID?: string | ||
| txnStatus: ETHTxnStatus | ||
| txnReceipt?: {[key: string]: any} | ||
| txnRevertReason: string | ||
| accountAddress: string | ||
| shopContractAddress: string | ||
| assetContractAddress: string | ||
| baseContractAddress: string | ||
| orderType: OrderType | ||
| orderStatus: OrderStatus | ||
| tokenIds: Array<string> | ||
| amounts: Array<string> | ||
| unitPrices: Array<string> | ||
| subtotalPrice: string | ||
| metatxFee: string | ||
| brokerFee: string | ||
| totalPrice: string | ||
| gasUsed: number | ||
| gasFeeWei: string | ||
| updatedAt: string | ||
| createdAt: string | ||
| } | ||
| export interface MetaTxLog { | ||
| id: number | ||
| txnHash?: string | ||
| txnNonce?: string | ||
| metaTxnID?: string | ||
| txnStatus: ETHTxnStatus | ||
| txnRevertReason: string | ||
| txnArgs: {[key: string]: any} | ||
| txnReceipt?: {[key: string]: any} | ||
| gasLimit: number | ||
| gasPrice: string | ||
| gasUsed: number | ||
| updatedAt: string | ||
| createdAt: string | ||
| } | ||
| export interface MetaTxEntry { | ||
| id: number | ||
| metaTxnID: string | ||
| txnStatus: ETHTxnStatus | ||
| txnRevertReason: string | ||
| index: number | ||
| logs?: Array<any> | ||
| updatedAt: string | ||
| createdAt: string | ||
| } | ||
| export interface Requirement { | ||
| app: string | ||
| version: string | ||
| etc: {[key: string]: string} | ||
| } | ||
| export interface Version { | ||
| webrpcVersion: string | ||
| schemaVersion: string | ||
| schemaHash: string | ||
| appVersion: string | ||
| } | ||
| export interface Page { | ||
@@ -340,219 +152,46 @@ pageSize?: number | ||
| export interface WalletConfig { | ||
| address: string | ||
| signers: Array<WalletSigner> | ||
| threshold: number | ||
| chainId?: number | ||
| export interface API { | ||
| ping(headers?: object): Promise<PingReturn> | ||
| version(headers?: object): Promise<VersionReturn> | ||
| runtimeStatus(headers?: object): Promise<RuntimeStatusReturn> | ||
| getSequenceContext(headers?: object): Promise<GetSequenceContextReturn> | ||
| getAuthToken(args: GetAuthTokenArgs, headers?: object): Promise<GetAuthTokenReturn> | ||
| friendList(args: FriendListArgs, headers?: object): Promise<FriendListReturn> | ||
| getFriendByAddress(args: GetFriendByAddressArgs, headers?: object): Promise<GetFriendByAddressReturn> | ||
| searchFriends(args: SearchFriendsArgs, headers?: object): Promise<SearchFriendsReturn> | ||
| addFriend(args: AddFriendArgs, headers?: object): Promise<AddFriendReturn> | ||
| updateFriendNickname(args: UpdateFriendNicknameArgs, headers?: object): Promise<UpdateFriendNicknameReturn> | ||
| removeFriend(args: RemoveFriendArgs, headers?: object): Promise<RemoveFriendReturn> | ||
| contractCall(args: ContractCallArgs, headers?: object): Promise<ContractCallReturn> | ||
| decodeContractCall(args: DecodeContractCallArgs, headers?: object): Promise<DecodeContractCallReturn> | ||
| lookupContractCallSelectors(args: LookupContractCallSelectorsArgs, headers?: object): Promise<LookupContractCallSelectorsReturn> | ||
| getInviteInfo(headers?: object): Promise<GetInviteInfoReturn> | ||
| internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn> | ||
| walletRecover(args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn> | ||
| } | ||
| export interface WalletSigner { | ||
| address: string | ||
| weight: number | ||
| export interface PingArgs { | ||
| } | ||
| export interface FeeOption { | ||
| token: FeeToken | ||
| to: string | ||
| value: string | ||
| gasLimit: number | ||
| export interface PingReturn { | ||
| status: boolean | ||
| } | ||
| export interface FeeToken { | ||
| chainId: number | ||
| name: string | ||
| symbol: string | ||
| type: ContractType | ||
| decimals?: number | ||
| logoURL: string | ||
| contractAddress?: string | ||
| originAddress?: string | ||
| tokenID?: string | ||
| export interface VersionArgs { | ||
| } | ||
| export interface GasReceipt { | ||
| gasFee: string | ||
| gasLimit: Array<string> | ||
| export interface VersionReturn { | ||
| version: Version | ||
| } | ||
| export interface MetaTxn { | ||
| contract: string | ||
| input: string | ||
| digest?: string | ||
| export interface RuntimeStatusArgs { | ||
| } | ||
| export interface TxnObj { | ||
| to: string | ||
| objs: Array<TxnObj> | ||
| txnStatus: string | ||
| txnRevertReason: string | ||
| logs?: Array<any> | ||
| export interface RuntimeStatusReturn { | ||
| status: RuntimeStatus | ||
| } | ||
| export interface MetaTxnReceipt { | ||
| id: string | ||
| status: string | ||
| revertReason: string | ||
| gasUsed: number | ||
| txnReceipt: string | ||
| batch: TxnObj | ||
| export interface GetSequenceContextArgs { | ||
| } | ||
| export interface SmartWalletContext { | ||
| factory: string | ||
| module: string | ||
| guestModule: string | ||
| export interface GetSequenceContextReturn { | ||
| data: SequenceContext | ||
| } | ||
| export interface TokenTransfer { | ||
| recipientAddress: string | ||
| tokenID: string | ||
| tokenAmount: string | ||
| } | ||
| export interface GetNiftyswapUnitPricesRequest { | ||
| orderType: OrderType | ||
| ids: Array<string> | ||
| amounts: Array<string> | ||
| } | ||
| export interface RegisterContractRequest { | ||
| type: ContractType | ||
| contractAddress: string | ||
| contractAlias: string | ||
| network: ETHNetwork | ||
| name: string | ||
| symbol: string | ||
| logoURL: string | ||
| website: string | ||
| description: string | ||
| ogImageURL: string | ||
| originChainId: number | ||
| originAddress: string | ||
| category: ContractCategory | ||
| decimals?: number | ||
| } | ||
| export interface Transaction { | ||
| txnHash?: string | ||
| blockNumber: number | ||
| chainId: number | ||
| metaTxnID?: string | ||
| transfers?: Array<TxnLogTransfer> | ||
| entries?: TxnObj | ||
| users?: {[key: string]: TxnLogUser} | ||
| contracts?: {[key: string]: Contract} | ||
| tokenMetadata?: {[key: string]: {[key: string]: TokenMetadata}} | ||
| timestamp: string | ||
| } | ||
| export interface TxnLogTransfer { | ||
| transferType: TransferType | ||
| contractAddress: string | ||
| from: string | ||
| to: string | ||
| ids: Array<string> | ||
| amounts: Array<string> | ||
| } | ||
| export interface TxnLogUser { | ||
| username: string | ||
| } | ||
| export interface TokenBalance { | ||
| contractAddress: string | ||
| contractAlias: string | ||
| logoURL: string | ||
| originChainId: number | ||
| originAddress: string | ||
| website: string | ||
| contractType: ContractType | ||
| name: string | ||
| symbol: string | ||
| category: ContractCategory | ||
| decimals?: number | ||
| amountLatest: string | ||
| amountConfirmed: string | ||
| } | ||
| export interface MetaTxSigner { | ||
| address: string | ||
| weight: number | ||
| } | ||
| export interface MetaTxSig { | ||
| address: string | ||
| signature: string | ||
| digest?: string | ||
| } | ||
| export interface WalletConfigImage { | ||
| imageHash: string | ||
| threshold: number | ||
| signers: Array<MetaTxSigner> | ||
| } | ||
| export interface WalletImage { | ||
| walletAddress: string | ||
| imageHash: string | ||
| } | ||
| export interface TransactionHistoryFilter { | ||
| users?: Array<string> | ||
| contractHandles?: Array<string> | ||
| transactionHashes?: Array<string> | ||
| fromBlock?: number | ||
| toBlock?: number | ||
| } | ||
| export interface SentTransactionsFilter { | ||
| pending: boolean | ||
| failed: boolean | ||
| } | ||
| export interface TxnData { | ||
| to: string | ||
| methodName: string | ||
| args: {[key: string]: any} | ||
| objs: Array<TxnData> | ||
| } | ||
| export interface ArcadeumAPI { | ||
| getAuthToken(args: GetAuthTokenArgs, headers?: object): Promise<GetAuthTokenReturn> | ||
| getSession(headers?: object): Promise<GetSessionReturn> | ||
| internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn> | ||
| walletRecover(args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn> | ||
| friendList(args: FriendListArgs, headers?: object): Promise<FriendListReturn> | ||
| getFriendByAddress(args: GetFriendByAddressArgs, headers?: object): Promise<GetFriendByAddressReturn> | ||
| searchFriends(args: SearchFriendsArgs, headers?: object): Promise<SearchFriendsReturn> | ||
| addFriend(args: AddFriendArgs, headers?: object): Promise<AddFriendReturn> | ||
| updateFriendNickname(args: UpdateFriendNicknameArgs, headers?: object): Promise<UpdateFriendNicknameReturn> | ||
| removeFriend(args: RemoveFriendArgs, headers?: object): Promise<RemoveFriendReturn> | ||
| getContract(args: GetContractArgs, headers?: object): Promise<GetContractReturn> | ||
| getContractByAlias(args: GetContractByAliasArgs, headers?: object): Promise<GetContractByAliasReturn> | ||
| getTokenContractsWithBalances(headers?: object): Promise<GetTokenContractsWithBalancesReturn> | ||
| getTokenBalances(headers?: object): Promise<GetTokenBalancesReturn> | ||
| metaTxLogList(args: MetaTxLogListArgs, headers?: object): Promise<MetaTxLogListReturn> | ||
| transactionHistory(args: TransactionHistoryArgs, headers?: object): Promise<TransactionHistoryReturn> | ||
| sentTransactions(args: SentTransactionsArgs, headers?: object): Promise<SentTransactionsReturn> | ||
| accountEtherBalance(args: AccountEtherBalanceArgs, headers?: object): Promise<AccountEtherBalanceReturn> | ||
| getAccountBalances(args: GetAccountBalancesArgs, headers?: object): Promise<GetAccountBalancesReturn> | ||
| getBalanceUpdates(args: GetBalanceUpdatesArgs, headers?: object): Promise<GetBalanceUpdatesReturn> | ||
| getTokenMetadata(args: GetTokenMetadataArgs, headers?: object): Promise<GetTokenMetadataReturn> | ||
| decodeTxnData(args: DecodeTxnDataArgs, headers?: object): Promise<DecodeTxnDataReturn> | ||
| getNiftyswapTokenSupply(args: GetNiftyswapTokenSupplyArgs, headers?: object): Promise<GetNiftyswapTokenSupplyReturn> | ||
| getNiftyswapUnitPrices(args: GetNiftyswapUnitPricesArgs, headers?: object): Promise<GetNiftyswapUnitPricesReturn> | ||
| sendMetaTxn(args: SendMetaTxnArgs, headers?: object): Promise<SendMetaTxnReturn> | ||
| getMetaTxnNonce(args: GetMetaTxnNonceArgs, headers?: object): Promise<GetMetaTxnNonceReturn> | ||
| getSmartWalletContext(headers?: object): Promise<GetSmartWalletContextReturn> | ||
| getMetaTxnReceipt(args: GetMetaTxnReceiptArgs, headers?: object): Promise<GetMetaTxnReceiptReturn> | ||
| getChainID(headers?: object): Promise<GetChainIDReturn> | ||
| tokenFee(headers?: object): Promise<TokenFeeReturn> | ||
| updateMetaTxnGasLimits(args: UpdateMetaTxnGasLimitsArgs, headers?: object): Promise<UpdateMetaTxnGasLimitsReturn> | ||
| getMetaTxnNetworkFeeOptions(args: GetMetaTxnNetworkFeeOptionsArgs, headers?: object): Promise<GetMetaTxnNetworkFeeOptionsReturn> | ||
| getInviteInfo(headers?: object): Promise<GetInviteInfoReturn> | ||
| ping(headers?: object): Promise<PingReturn> | ||
| version(headers?: object): Promise<VersionReturn> | ||
| requirements(headers?: object): Promise<RequirementsReturn> | ||
| } | ||
| export interface GetAuthTokenArgs { | ||
@@ -568,25 +207,2 @@ ewtString: string | ||
| } | ||
| export interface GetSessionArgs { | ||
| } | ||
| export interface GetSessionReturn { | ||
| address: string | ||
| user?: User | ||
| } | ||
| export interface InternalClaimAccessCodeArgs { | ||
| address: string | ||
| accessCode: string | ||
| } | ||
| export interface InternalClaimAccessCodeReturn { | ||
| status: boolean | ||
| } | ||
| export interface WalletRecoverArgs { | ||
| username: string | ||
| secretHash: string | ||
| } | ||
| export interface WalletRecoverReturn { | ||
| encryptedWallet: string | ||
| } | ||
| export interface FriendListArgs { | ||
@@ -640,170 +256,27 @@ page?: Page | ||
| } | ||
| export interface GetContractArgs { | ||
| contractHandle: string | ||
| export interface ContractCallArgs { | ||
| chainID: string | ||
| contract: string | ||
| inputExpr: string | ||
| outputExpr: string | ||
| args: Array<string> | ||
| } | ||
| export interface GetContractReturn { | ||
| contract: Contract | ||
| export interface ContractCallReturn { | ||
| returns: Array<string> | ||
| } | ||
| export interface GetContractByAliasArgs { | ||
| alias: string | ||
| export interface DecodeContractCallArgs { | ||
| callData: string | ||
| } | ||
| export interface GetContractByAliasReturn { | ||
| contract: Contract | ||
| export interface DecodeContractCallReturn { | ||
| call: ContractCall | ||
| } | ||
| export interface GetTokenContractsWithBalancesArgs { | ||
| export interface LookupContractCallSelectorsArgs { | ||
| selectors: Array<string> | ||
| } | ||
| export interface GetTokenContractsWithBalancesReturn { | ||
| contracts: Array<Contract> | ||
| export interface LookupContractCallSelectorsReturn { | ||
| signatures: Array<Array<string>> | ||
| } | ||
| export interface GetTokenBalancesArgs { | ||
| } | ||
| export interface GetTokenBalancesReturn { | ||
| balances: Array<TokenBalance> | ||
| } | ||
| export interface MetaTxLogListArgs { | ||
| page?: Page | ||
| } | ||
| export interface MetaTxLogListReturn { | ||
| page: Page | ||
| logs: Array<MetaTxLog> | ||
| } | ||
| export interface TransactionHistoryArgs { | ||
| filter: TransactionHistoryFilter | ||
| page?: Page | ||
| } | ||
| export interface TransactionHistoryReturn { | ||
| page: Page | ||
| transactions: Array<Transaction> | ||
| } | ||
| export interface SentTransactionsArgs { | ||
| filter: SentTransactionsFilter | ||
| page?: Page | ||
| } | ||
| export interface SentTransactionsReturn { | ||
| page: Page | ||
| transactions: Array<Transaction> | ||
| } | ||
| export interface AccountEtherBalanceArgs { | ||
| accountAddress: string | ||
| } | ||
| export interface AccountEtherBalanceReturn { | ||
| balance: EtherBalance | ||
| } | ||
| export interface GetAccountBalancesArgs { | ||
| contractHandle: string | ||
| accountAddress: string | ||
| includeMetadata?: boolean | ||
| } | ||
| export interface GetAccountBalancesReturn { | ||
| status: boolean | ||
| balances: Array<Balance> | ||
| } | ||
| export interface GetBalanceUpdatesArgs { | ||
| contractHandle: string | ||
| lastBalanceID: number | ||
| page?: Page | ||
| } | ||
| export interface GetBalanceUpdatesReturn { | ||
| page?: Page | ||
| balances: Array<Balance> | ||
| } | ||
| export interface GetTokenMetadataArgs { | ||
| contractHandle: string | ||
| tokenIDs: Array<string> | ||
| } | ||
| export interface GetTokenMetadataReturn { | ||
| tokenMetadata: Array<TokenMetadata> | ||
| } | ||
| export interface DecodeTxnDataArgs { | ||
| input: string | ||
| } | ||
| export interface DecodeTxnDataReturn { | ||
| res: TxnData | ||
| } | ||
| export interface GetNiftyswapTokenSupplyArgs { | ||
| shopContractHandle: string | ||
| ids: Array<string> | ||
| } | ||
| export interface GetNiftyswapTokenSupplyReturn { | ||
| amounts: Array<string> | ||
| } | ||
| export interface GetNiftyswapUnitPricesArgs { | ||
| shopContractHandle: string | ||
| req: GetNiftyswapUnitPricesRequest | ||
| } | ||
| export interface GetNiftyswapUnitPricesReturn { | ||
| prices: Array<string> | ||
| } | ||
| export interface SendMetaTxnArgs { | ||
| call: MetaTxn | ||
| } | ||
| export interface SendMetaTxnReturn { | ||
| status: boolean | ||
| txnHash: string | ||
| } | ||
| export interface GetMetaTxnNonceArgs { | ||
| walletContractAddress: string | ||
| space?: string | ||
| } | ||
| export interface GetMetaTxnNonceReturn { | ||
| nonce: string | ||
| } | ||
| export interface GetSmartWalletContextArgs { | ||
| } | ||
| export interface GetSmartWalletContextReturn { | ||
| data: SmartWalletContext | ||
| } | ||
| export interface GetMetaTxnReceiptArgs { | ||
| metaTxID: string | ||
| } | ||
| export interface GetMetaTxnReceiptReturn { | ||
| receipt: MetaTxnReceipt | ||
| } | ||
| export interface GetChainIDArgs { | ||
| } | ||
| export interface GetChainIDReturn { | ||
| chainID: number | ||
| } | ||
| export interface TokenFeeArgs { | ||
| } | ||
| export interface TokenFeeReturn { | ||
| isFee: boolean | ||
| fee: string | ||
| } | ||
| export interface UpdateMetaTxnGasLimitsArgs { | ||
| walletAddress: string | ||
| payload: string | ||
| } | ||
| export interface UpdateMetaTxnGasLimitsReturn { | ||
| payload: string | ||
| } | ||
| export interface GetMetaTxnNetworkFeeOptionsArgs { | ||
| walletConfig: WalletConfig | ||
| payload: string | ||
| } | ||
| export interface GetMetaTxnNetworkFeeOptionsReturn { | ||
| options: Array<FeeOption> | ||
| } | ||
| export interface GetInviteInfoArgs { | ||
@@ -815,22 +288,20 @@ } | ||
| } | ||
| export interface PingArgs { | ||
| export interface InternalClaimAccessCodeArgs { | ||
| address: string | ||
| accessCode: string | ||
| } | ||
| export interface PingReturn { | ||
| export interface InternalClaimAccessCodeReturn { | ||
| status: boolean | ||
| } | ||
| export interface VersionArgs { | ||
| export interface WalletRecoverArgs { | ||
| username: string | ||
| secretHash: string | ||
| } | ||
| export interface VersionReturn { | ||
| version: Version | ||
| export interface WalletRecoverReturn { | ||
| encryptedWallet: string | ||
| } | ||
| export interface RequirementsArgs { | ||
| } | ||
| export interface RequirementsReturn { | ||
| reqs: Array<Requirement> | ||
| } | ||
@@ -840,6 +311,6 @@ // | ||
| // | ||
| export class ArcadeumAPI implements ArcadeumAPI { | ||
| export class API implements API { | ||
| protected hostname: string | ||
| protected fetch: Fetch | ||
| protected path = '/rpc/ArcadeumAPI/' | ||
| protected path = '/rpc/API/' | ||
@@ -855,12 +326,10 @@ constructor(hostname: string, fetch: Fetch) { | ||
| getAuthToken = (args: GetAuthTokenArgs, headers?: object): Promise<GetAuthTokenReturn> => { | ||
| ping = (headers?: object): Promise<PingReturn> => { | ||
| return this.fetch( | ||
| this.url('GetAuthToken'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| this.url('Ping'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: <boolean>(_data.status), | ||
| jwtToken: <string>(_data.jwtToken), | ||
| address: <string>(_data.address), | ||
| user: <User>(_data.user) | ||
| status: <boolean>(_data.status) | ||
| } | ||
@@ -871,5 +340,5 @@ }) | ||
| getSession = (headers?: object): Promise<GetSessionReturn> => { | ||
| version = (headers?: object): Promise<VersionReturn> => { | ||
| return this.fetch( | ||
| this.url('GetSession'), | ||
| this.url('Version'), | ||
| createHTTPRequest({}, headers) | ||
@@ -879,4 +348,3 @@ ).then((res) => { | ||
| return { | ||
| address: <string>(_data.address), | ||
| user: <User>(_data.user) | ||
| version: <Version>(_data.version) | ||
| } | ||
@@ -887,9 +355,10 @@ }) | ||
| internalClaimAccessCode = (args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn> => { | ||
| runtimeStatus = (headers?: object): Promise<RuntimeStatusReturn> => { | ||
| return this.fetch( | ||
| this.url('InternalClaimAccessCode'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| this.url('RuntimeStatus'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: <boolean>(_data.status) | ||
| status: <RuntimeStatus>(_data.status) | ||
| } | ||
@@ -900,9 +369,25 @@ }) | ||
| walletRecover = (args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn> => { | ||
| getSequenceContext = (headers?: object): Promise<GetSequenceContextReturn> => { | ||
| return this.fetch( | ||
| this.url('WalletRecover'), | ||
| this.url('GetSequenceContext'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| data: <SequenceContext>(_data.data) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getAuthToken = (args: GetAuthTokenArgs, headers?: object): Promise<GetAuthTokenReturn> => { | ||
| return this.fetch( | ||
| this.url('GetAuthToken'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| encryptedWallet: <string>(_data.encryptedWallet) | ||
| status: <boolean>(_data.status), | ||
| jwtToken: <string>(_data.jwtToken), | ||
| address: <string>(_data.address), | ||
| user: <User>(_data.user) | ||
| } | ||
@@ -989,9 +474,9 @@ }) | ||
| getContract = (args: GetContractArgs, headers?: object): Promise<GetContractReturn> => { | ||
| contractCall = (args: ContractCallArgs, headers?: object): Promise<ContractCallReturn> => { | ||
| return this.fetch( | ||
| this.url('GetContract'), | ||
| this.url('ContractCall'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contract: <Contract>(_data.contract) | ||
| returns: <Array<string>>(_data.returns) | ||
| } | ||
@@ -1002,9 +487,9 @@ }) | ||
| getContractByAlias = (args: GetContractByAliasArgs, headers?: object): Promise<GetContractByAliasReturn> => { | ||
| decodeContractCall = (args: DecodeContractCallArgs, headers?: object): Promise<DecodeContractCallReturn> => { | ||
| return this.fetch( | ||
| this.url('GetContractByAlias'), | ||
| this.url('DecodeContractCall'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contract: <Contract>(_data.contract) | ||
| call: <ContractCall>(_data.call) | ||
| } | ||
@@ -1015,36 +500,9 @@ }) | ||
| getTokenContractsWithBalances = (headers?: object): Promise<GetTokenContractsWithBalancesReturn> => { | ||
| lookupContractCallSelectors = (args: LookupContractCallSelectorsArgs, headers?: object): Promise<LookupContractCallSelectorsReturn> => { | ||
| return this.fetch( | ||
| this.url('GetTokenContractsWithBalances'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| contracts: <Array<Contract>>(_data.contracts) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getTokenBalances = (headers?: object): Promise<GetTokenBalancesReturn> => { | ||
| return this.fetch( | ||
| this.url('GetTokenBalances'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| balances: <Array<TokenBalance>>(_data.balances) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| metaTxLogList = (args: MetaTxLogListArgs, headers?: object): Promise<MetaTxLogListReturn> => { | ||
| return this.fetch( | ||
| this.url('MetaTxLogList'), | ||
| this.url('LookupContractCallSelectors'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: <Page>(_data.page), | ||
| logs: <Array<MetaTxLog>>(_data.logs) | ||
| signatures: <Array<Array<string>>>(_data.signatures) | ||
| } | ||
@@ -1055,215 +513,2 @@ }) | ||
| transactionHistory = (args: TransactionHistoryArgs, headers?: object): Promise<TransactionHistoryReturn> => { | ||
| return this.fetch( | ||
| this.url('TransactionHistory'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: <Page>(_data.page), | ||
| transactions: <Array<Transaction>>(_data.transactions) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| sentTransactions = (args: SentTransactionsArgs, headers?: object): Promise<SentTransactionsReturn> => { | ||
| return this.fetch( | ||
| this.url('SentTransactions'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: <Page>(_data.page), | ||
| transactions: <Array<Transaction>>(_data.transactions) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| accountEtherBalance = (args: AccountEtherBalanceArgs, headers?: object): Promise<AccountEtherBalanceReturn> => { | ||
| return this.fetch( | ||
| this.url('AccountEtherBalance'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| balance: <EtherBalance>(_data.balance) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getAccountBalances = (args: GetAccountBalancesArgs, headers?: object): Promise<GetAccountBalancesReturn> => { | ||
| return this.fetch( | ||
| this.url('GetAccountBalances'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: <boolean>(_data.status), | ||
| balances: <Array<Balance>>(_data.balances) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getBalanceUpdates = (args: GetBalanceUpdatesArgs, headers?: object): Promise<GetBalanceUpdatesReturn> => { | ||
| return this.fetch( | ||
| this.url('GetBalanceUpdates'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| page: <Page>(_data.page), | ||
| balances: <Array<Balance>>(_data.balances) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getTokenMetadata = (args: GetTokenMetadataArgs, headers?: object): Promise<GetTokenMetadataReturn> => { | ||
| return this.fetch( | ||
| this.url('GetTokenMetadata'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| tokenMetadata: <Array<TokenMetadata>>(_data.tokenMetadata) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| decodeTxnData = (args: DecodeTxnDataArgs, headers?: object): Promise<DecodeTxnDataReturn> => { | ||
| return this.fetch( | ||
| this.url('DecodeTxnData'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| res: <TxnData>(_data.res) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getNiftyswapTokenSupply = (args: GetNiftyswapTokenSupplyArgs, headers?: object): Promise<GetNiftyswapTokenSupplyReturn> => { | ||
| return this.fetch( | ||
| this.url('GetNiftyswapTokenSupply'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| amounts: <Array<string>>(_data.amounts) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getNiftyswapUnitPrices = (args: GetNiftyswapUnitPricesArgs, headers?: object): Promise<GetNiftyswapUnitPricesReturn> => { | ||
| return this.fetch( | ||
| this.url('GetNiftyswapUnitPrices'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| prices: <Array<string>>(_data.prices) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| sendMetaTxn = (args: SendMetaTxnArgs, headers?: object): Promise<SendMetaTxnReturn> => { | ||
| return this.fetch( | ||
| this.url('SendMetaTxn'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| status: <boolean>(_data.status), | ||
| txnHash: <string>(_data.txnHash) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getMetaTxnNonce = (args: GetMetaTxnNonceArgs, headers?: object): Promise<GetMetaTxnNonceReturn> => { | ||
| return this.fetch( | ||
| this.url('GetMetaTxnNonce'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| nonce: <string>(_data.nonce) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getSmartWalletContext = (headers?: object): Promise<GetSmartWalletContextReturn> => { | ||
| return this.fetch( | ||
| this.url('GetSmartWalletContext'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| data: <SmartWalletContext>(_data.data) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getMetaTxnReceipt = (args: GetMetaTxnReceiptArgs, headers?: object): Promise<GetMetaTxnReceiptReturn> => { | ||
| return this.fetch( | ||
| this.url('GetMetaTxnReceipt'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| receipt: <MetaTxnReceipt>(_data.receipt) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getChainID = (headers?: object): Promise<GetChainIDReturn> => { | ||
| return this.fetch( | ||
| this.url('GetChainID'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| chainID: <number>(_data.chainID) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| tokenFee = (headers?: object): Promise<TokenFeeReturn> => { | ||
| return this.fetch( | ||
| this.url('TokenFee'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| isFee: <boolean>(_data.isFee), | ||
| fee: <string>(_data.fee) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| updateMetaTxnGasLimits = (args: UpdateMetaTxnGasLimitsArgs, headers?: object): Promise<UpdateMetaTxnGasLimitsReturn> => { | ||
| return this.fetch( | ||
| this.url('UpdateMetaTxnGasLimits'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| payload: <string>(_data.payload) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getMetaTxnNetworkFeeOptions = (args: GetMetaTxnNetworkFeeOptionsArgs, headers?: object): Promise<GetMetaTxnNetworkFeeOptionsReturn> => { | ||
| return this.fetch( | ||
| this.url('GetMetaTxnNetworkFeeOptions'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| options: <Array<FeeOption>>(_data.options) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| getInviteInfo = (headers?: object): Promise<GetInviteInfoReturn> => { | ||
@@ -1282,7 +527,6 @@ return this.fetch( | ||
| ping = (headers?: object): Promise<PingReturn> => { | ||
| internalClaimAccessCode = (args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn> => { | ||
| return this.fetch( | ||
| this.url('Ping'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| this.url('InternalClaimAccessCode'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
@@ -1296,10 +540,9 @@ return { | ||
| version = (headers?: object): Promise<VersionReturn> => { | ||
| walletRecover = (args: WalletRecoverArgs, headers?: object): Promise<WalletRecoverReturn> => { | ||
| return this.fetch( | ||
| this.url('Version'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| this.url('WalletRecover'), | ||
| createHTTPRequest(args, headers)).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| version: <Version>(_data.version) | ||
| encryptedWallet: <string>(_data.encryptedWallet) | ||
| } | ||
@@ -1310,15 +553,2 @@ }) | ||
| requirements = (headers?: object): Promise<RequirementsReturn> => { | ||
| return this.fetch( | ||
| this.url('Requirements'), | ||
| createHTTPRequest({}, headers) | ||
| ).then((res) => { | ||
| return buildResponse(res).then(_data => { | ||
| return { | ||
| reqs: <Array<Requirement>>(_data.reqs) | ||
| } | ||
| }) | ||
| }) | ||
| } | ||
| } | ||
@@ -1325,0 +555,0 @@ |
+2
-2
@@ -5,5 +5,5 @@ export * from './api.gen' | ||
| import { ArcadeumAPI as BaseArcadeumAPI } from './api.gen' | ||
| import { API as BaseSequenceAPI } from './api.gen' | ||
| export class ArcadeumAPIClient extends BaseArcadeumAPI { | ||
| export class SequenceAPIClient extends BaseSequenceAPI { | ||
| constructor(hostname: string, public jwtAuth?: string) { | ||
@@ -10,0 +10,0 @@ super(hostname, fetch) |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
105
-41.67%53380
-53.22%1565
-55.7%Updated