@streamflow/stream 7.5.3 → 8.0.0-alpha.p287.5172056
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseStreamClient-CQOC8m8V.d.cts +542 -0
- package/dist/cjs/aptos/index.cjs +456 -0
- package/dist/cjs/aptos/index.cjs.map +1 -0
- package/dist/cjs/aptos/index.d.cts +14 -0
- package/dist/cjs/evm/index.cjs +1915 -0
- package/dist/cjs/evm/index.cjs.map +1 -0
- package/dist/cjs/evm/index.d.cts +13 -0
- package/dist/cjs/index-CYu6i--S.d.cts +136 -0
- package/dist/cjs/index-DUVcpIhD.d.cts +203 -0
- package/dist/cjs/index-b7Qo5mCj.d.cts +664 -0
- package/dist/cjs/index-fNLnPKzv.d.cts +213 -0
- package/dist/cjs/index.cjs +7189 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/index.d.cts +192 -0
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.cjs +4 -0
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.cjs.map +1 -0
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.d.cts +1234 -0
- package/dist/cjs/solana/index.cjs +3749 -0
- package/dist/cjs/solana/index.cjs.map +1 -0
- package/dist/cjs/solana/index.d.cts +17 -0
- package/dist/cjs/sui/index.cjs +1021 -0
- package/dist/cjs/sui/index.cjs.map +1 -0
- package/dist/cjs/sui/index.d.cts +13 -0
- package/dist/esm/BaseStreamClient-CQOC8m8V.d.ts +542 -0
- package/dist/esm/aptos/index.d.ts +14 -4
- package/dist/esm/aptos/index.js +443 -4
- package/dist/esm/aptos/index.js.map +1 -0
- package/dist/esm/evm/index.d.ts +13 -5
- package/dist/esm/evm/index.js +1902 -5
- package/dist/esm/evm/index.js.map +1 -0
- package/dist/esm/index-BEo0O2IG.d.ts +664 -0
- package/dist/esm/index-CWmb3-x9.d.ts +136 -0
- package/dist/esm/index-Cgv37xlG.d.ts +213 -0
- package/dist/esm/index-D6QYg8hn.d.ts +203 -0
- package/dist/esm/index.d.ts +192 -10
- package/dist/esm/index.js +7096 -10
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/solana/descriptor/idl/streamflow_aligned_unlocks.json +917 -1368
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.d.ts +3 -1
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.js +3 -1
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.js.map +1 -0
- package/dist/esm/solana/index.d.ts +17 -7
- package/dist/esm/solana/index.js +3693 -7
- package/dist/esm/solana/index.js.map +1 -0
- package/dist/esm/sui/index.d.ts +13 -4
- package/dist/esm/sui/index.js +1011 -4
- package/dist/esm/sui/index.js.map +1 -0
- package/package.json +57 -27
- package/dist/cjs/__tests__/aptos/streamClient.spec.js +0 -111
- package/dist/cjs/__tests__/common/GenericStreamClient.spec.js +0 -45
- package/dist/cjs/aptos/StreamClient.js +0 -226
- package/dist/cjs/aptos/constants.js +0 -27
- package/dist/cjs/aptos/index.js +0 -38
- package/dist/cjs/aptos/types.js +0 -69
- package/dist/cjs/aptos/utils.js +0 -34
- package/dist/cjs/aptos/wallet.js +0 -34
- package/dist/cjs/common/BaseStreamClient.js +0 -23
- package/dist/cjs/common/GenericStreamClient.js +0 -102
- package/dist/cjs/common/constants.js +0 -10
- package/dist/cjs/common/contractUtils.js +0 -77
- package/dist/cjs/common/types.js +0 -141
- package/dist/cjs/common/utils.js +0 -69
- package/dist/cjs/evm/StreamClient.js +0 -238
- package/dist/cjs/evm/abi.js +0 -1257
- package/dist/cjs/evm/constants.js +0 -38
- package/dist/cjs/evm/ercAbi.js +0 -224
- package/dist/cjs/evm/index.js +0 -40
- package/dist/cjs/evm/types.js +0 -66
- package/dist/cjs/evm/utils.js +0 -11
- package/dist/cjs/index.js +0 -43
- package/dist/cjs/solana/StreamClient.js +0 -1042
- package/dist/cjs/solana/constants.js +0 -95
- package/dist/cjs/solana/descriptor/idl/streamflow_aligned_unlocks.json +0 -1437
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.js +0 -2
- package/dist/cjs/solana/index.js +0 -40
- package/dist/cjs/solana/instructionTypes.js +0 -2
- package/dist/cjs/solana/instructions.js +0 -298
- package/dist/cjs/solana/layout.js +0 -182
- package/dist/cjs/solana/lib/derive-accounts.js +0 -17
- package/dist/cjs/solana/lib/utils.js +0 -127
- package/dist/cjs/solana/timelockIDL.js +0 -422
- package/dist/cjs/solana/types.js +0 -93
- package/dist/cjs/sui/StreamClient.js +0 -416
- package/dist/cjs/sui/constants.js +0 -42
- package/dist/cjs/sui/index.js +0 -37
- package/dist/cjs/sui/types.js +0 -68
- package/dist/cjs/sui/utils.js +0 -46
- package/dist/cjs/sui/wallet.js +0 -40
- package/dist/esm/__tests__/aptos/streamClient.spec.d.ts +0 -1
- package/dist/esm/__tests__/aptos/streamClient.spec.js +0 -106
- package/dist/esm/__tests__/common/GenericStreamClient.spec.d.ts +0 -1
- package/dist/esm/__tests__/common/GenericStreamClient.spec.js +0 -40
- package/dist/esm/aptos/StreamClient.d.ts +0 -53
- package/dist/esm/aptos/StreamClient.js +0 -226
- package/dist/esm/aptos/constants.d.ts +0 -8
- package/dist/esm/aptos/constants.js +0 -24
- package/dist/esm/aptos/types.d.ts +0 -109
- package/dist/esm/aptos/types.js +0 -105
- package/dist/esm/aptos/utils.d.ts +0 -7
- package/dist/esm/aptos/utils.js +0 -30
- package/dist/esm/aptos/wallet.d.ts +0 -9
- package/dist/esm/aptos/wallet.js +0 -33
- package/dist/esm/common/BaseStreamClient.d.ts +0 -22
- package/dist/esm/common/BaseStreamClient.js +0 -19
- package/dist/esm/common/GenericStreamClient.d.ts +0 -72
- package/dist/esm/common/GenericStreamClient.js +0 -101
- package/dist/esm/common/constants.d.ts +0 -4
- package/dist/esm/common/constants.js +0 -4
- package/dist/esm/common/contractUtils.d.ts +0 -63
- package/dist/esm/common/contractUtils.js +0 -61
- package/dist/esm/common/types.d.ts +0 -353
- package/dist/esm/common/types.js +0 -135
- package/dist/esm/common/utils.d.ts +0 -32
- package/dist/esm/common/utils.js +0 -59
- package/dist/esm/evm/StreamClient.d.ts +0 -32
- package/dist/esm/evm/StreamClient.js +0 -237
- package/dist/esm/evm/abi.d.ts +0 -111
- package/dist/esm/evm/abi.js +0 -1255
- package/dist/esm/evm/constants.d.ts +0 -20
- package/dist/esm/evm/constants.js +0 -35
- package/dist/esm/evm/ercAbi.d.ts +0 -39
- package/dist/esm/evm/ercAbi.js +0 -222
- package/dist/esm/evm/types.d.ts +0 -98
- package/dist/esm/evm/types.js +0 -102
- package/dist/esm/evm/utils.d.ts +0 -1
- package/dist/esm/evm/utils.js +0 -8
- package/dist/esm/solana/StreamClient.d.ts +0 -150
- package/dist/esm/solana/StreamClient.js +0 -1017
- package/dist/esm/solana/constants.d.ts +0 -70
- package/dist/esm/solana/constants.js +0 -92
- package/dist/esm/solana/instructionTypes.d.ts +0 -101
- package/dist/esm/solana/instructionTypes.js +0 -1
- package/dist/esm/solana/instructions.d.ts +0 -142
- package/dist/esm/solana/instructions.js +0 -265
- package/dist/esm/solana/layout.d.ts +0 -27
- package/dist/esm/solana/layout.js +0 -155
- package/dist/esm/solana/lib/derive-accounts.d.ts +0 -4
- package/dist/esm/solana/lib/derive-accounts.js +0 -11
- package/dist/esm/solana/lib/utils.d.ts +0 -22
- package/dist/esm/solana/lib/utils.js +0 -117
- package/dist/esm/solana/timelockIDL.d.ts +0 -22
- package/dist/esm/solana/timelockIDL.js +0 -420
- package/dist/esm/solana/types.d.ts +0 -180
- package/dist/esm/solana/types.js +0 -142
- package/dist/esm/sui/StreamClient.d.ts +0 -82
- package/dist/esm/sui/StreamClient.js +0 -417
- package/dist/esm/sui/constants.d.ts +0 -10
- package/dist/esm/sui/constants.js +0 -39
- package/dist/esm/sui/types.d.ts +0 -167
- package/dist/esm/sui/types.js +0 -104
- package/dist/esm/sui/utils.d.ts +0 -11
- package/dist/esm/sui/utils.js +0 -39
- package/dist/esm/sui/wallet.d.ts +0 -17
- package/dist/esm/sui/wallet.js +0 -38
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../common/BaseStreamClient.ts","../../../evm/constants.ts","../../../evm/abi.ts","../../../evm/ercAbi.ts","../../../common/constants.ts","../../../common/contractUtils.ts","../../../common/utils.ts","../../../evm/types.ts","../../../evm/utils.ts","../../../evm/StreamClient.ts"],"names":["ICluster","BN","IChain","ethers","toChecksumAddress"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBO,IAAe,mBAAf,MAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4CrC,MAAa,WAAY,CAAA,WAAA,EAA2B,mBAA4C,EAAA;AAC9F,IAAA,MAAM,IAAO,GAAA,MAAM,IAAK,CAAA,OAAA,CAAQ,aAAa,mBAAmB,CAAA;AAChE,IAAA,IAAI,IAAM,EAAA;AACR,MAAO,OAAA,IAAA,CAAK,aAAa,IAAK,CAAA,aAAA;AAAA;AAEhC,IAAO,OAAA,IAAA,CAAK,wBAAwB,mBAAmB,CAAA;AAAA;AACzD;AAAA,EAGA,iBAAiB,GAA2B,EAAA;AAC1C,IAAO,OAAA,IAAA;AAAA;AAEX,CAAA;;;AC1EA,IAAA,iBAAA,GAAA;AAAA,QAAA,CAAA,iBAAA,EAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,mBAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAEO,IAAM,oBAAiD,GAAA;AAAA,EAC5D,CAACA,eAAS,CAAA,OAAO,GAAG,4CAAA;AAAA,EACpB,CAACA,eAAS,CAAA,MAAM,GAAG,4CAAA;AAAA,EACnB,CAACA,eAAS,CAAA,OAAO,GAAG,4CAAA;AAAA,EACpB,CAACA,eAAS,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AC1C,mBAAmB,mBAAuB,IAAA;AAAA,KAC5C;AAAA;AACF,EAEQ,iBAAiB,EAAoB,EAAA;AAE3C,IAAA,OAAOG,0CAAkB,CAAK,EAAA,EAAA,EAAA,CAAG,KAAM,CAAA,GAAG,CAAC,CAAE,CAAA,CAAA;AAAA;AAEjD","file":"index.cjs","sourcesContent":["import {\n type ICancelData,\n type ICreateMultipleStreamData,\n type ICreateResult,\n type ICreateStreamData,\n type IFees,\n type IGetAllData,\n type IGetFeesData,\n type IGetOneData,\n type IMultiTransactionResult,\n type ITopUpData,\n type ITransactionResult,\n type ITransferData,\n type IUpdateData,\n type IWithdrawData,\n type Stream,\n} from \"./types.js\";\n\nexport abstract class BaseStreamClient {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract create(streamData: ICreateStreamData, chainSpecificParams: any): Promise<ICreateResult>;\n\n abstract createMultiple(\n multipleStreamData: ICreateMultipleStreamData,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n chainSpecificParams: any,\n ): Promise<IMultiTransactionResult>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract withdraw(withdrawData: IWithdrawData, chainSpecificParams: any): Promise<ITransactionResult>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract cancel(cancelData: ICancelData, chainSpecificParams: any): Promise<ITransactionResult>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract transfer(transferData: ITransferData, chainSpecificParams: any): Promise<ITransactionResult>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract topup(topupData: ITopUpData, chainSpecificParams: any): Promise<ITransactionResult>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract getOne(getOneData: IGetOneData, chainSpecificParams: any): Promise<Stream>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract get(getAllData: IGetAllData, chainSpecificParams: any): Promise<[string, Stream][]>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract update(updateData: IUpdateData, chainSpecificParams: any): Promise<ITransactionResult>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract getFees(getFeesData: IGetFeesData, chainSpecificParams?: any): Promise<IFees | null>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n abstract getDefaultStreamflowFee(chainSpecificParams?: any): Promise<number>;\n\n /**\n * Returns total fee percent, streamflow fees + partner fees\n * @param getFeesData structure with address for which we need to derive fee, either sender or partner usually\n * @param chainSpecificParams additional parameters required by chain client\n * @returns fee as floating number, so if fee is 0.99%, it will return 0.99\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public async getTotalFee(getFeesData: IGetFeesData, chainSpecificParams?: any): Promise<number> {\n const fees = await this.getFees(getFeesData, chainSpecificParams);\n if (fees) {\n return fees.partnerFee + fees.streamflowFee;\n }\n return this.getDefaultStreamflowFee(chainSpecificParams);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n extractErrorCode(err: Error): string | null {\n return null;\n }\n}\n","import { ContractErrorCode, ICluster } from \"../common/types.js\";\n\nexport const ETHEREUM_PROGRAM_IDS: Record<ICluster, string> = {\n [ICluster.Mainnet]: \"0x94d4646Bd307Bf91CB1893BC64d976BF9E60D9B2\",\n [ICluster.Devnet]: \"0x5Db7a43D20De64E3a3BC765334a477026FD13E7d\",\n [ICluster.Testnet]: \"0x5Db7a43D20De64E3a3BC765334a477026FD13E7d\",\n [ICluster.Local]: \"0x5Db7a43D20De64E3a3BC765334a477026FD13E7d\",\n};\n\nexport const BNB_PROGRAM_IDS: Record<ICluster, string> = {\n [ICluster.Mainnet]: \"0x94d4646Bd307Bf91CB1893BC64d976BF9E60D9B2\",\n [ICluster.Devnet]: \"0x5Db7a43D20De64E3a3BC765334a477026FD13E7d\",\n [ICluster.Testnet]: \"0x5Db7a43D20De64E3a3BC765334a477026FD13E7d\",\n [ICluster.Local]: \"0x5Db7a43D20De64E3a3BC765334a477026FD13E7d\",\n};\n\nexport const POLYGON_PROGRAM_IDS: Record<ICluster, string> = {\n [ICluster.Mainnet]: \"0x94d4646Bd307Bf91CB1893BC64d976BF9E60D9B2\",\n [ICluster.Devnet]: \"0x5Db7a43D20De64E3a3BC765334a477026FD13E7d\",\n [ICluster.Testnet]: \"0x5Db7a43D20De64E3a3BC765334a477026FD13E7d\",\n [ICluster.Local]: \"0x5Db7a43D20De64E3a3BC765334a477026FD13E7d\",\n};\n\nexport const EVM_ERROR_MATCH_REGEX = /execution reverted: ([A-Z_]+)/;\n\nexport const EVM_ERROR_MAP = {\n ECONTRACT_NOT_INIT: ContractErrorCode.ECONTRACT_NOT_INIT,\n EBAD_AMOUNT: ContractErrorCode.EBAD_AMOUNT,\n ENO_PERMISSIONS: ContractErrorCode.ENO_PERMISSIONS,\n EBADINPUT: ContractErrorCode.EBADINPUT,\n ECLOSED: ContractErrorCode.ECLOSED,\n EBAD_INPUT_AMOUNT_PER_PERIOD: ContractErrorCode.EBAD_INPUT_AMOUNT_PER_PERIOD,\n EBAD_INPUT_PAUSABLE: ContractErrorCode.EBAD_INPUT_PAUSABLE,\n EBAD_INPUT_UPDATE_RATE: ContractErrorCode.EBAD_INPUT_UPDATE_RATE,\n EBAD_INPUT_CLIFF_AMOUNT: ContractErrorCode.EBAD_INPUT_CLIFF_AMOUNT,\n EBAD_INPUT_PERIOD: ContractErrorCode.EBAD_INPUT_PERIOD,\n EBAD_INPUT_START: ContractErrorCode.EBAD_INPUT_START,\n EBAD_INSUFFICIENT_TOKEN_ALLOWANCE: ContractErrorCode.EBAD_INSUFFICIENT_TOKEN_ALLOWANCE,\n EBAD_INSUFFICIENT_WITHDRAWAL_FEES: ContractErrorCode.EBAD_INSUFFICIENT_WITHDRAWAL_FEES,\n};\n","export default [\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"ContractCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_stream_id\",\n type: \"address\",\n },\n ],\n name: \"cancel\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_new_fees\",\n type: \"uint256\",\n },\n ],\n name: \"changeStreamflowFees\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"_new_treasury\",\n type: \"address\",\n },\n ],\n name: \"changeTreasury\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_new_fee\",\n type: \"uint256\",\n },\n ],\n name: \"changeTxFee\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"_new_withdawor\",\n type: \"address\",\n },\n ],\n name: \"changeWithdrawor\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"config\",\n outputs: [\n {\n internalType: \"address\",\n name: \"admin\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"streamflow_fees\",\n type: \"uint256\",\n },\n {\n internalType: \"address payable\",\n name: \"treasury\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"withdrawor\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"tx_fee\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"_token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_amount_per_period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_cliff_amount\",\n type: \"uint256\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"cancelable_by_sender\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"cancelable_by_recipient\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"transferable_by_sender\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"transferable_by_recipient\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"can_topup\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"pausable\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"can_update_rate\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"automatic_withdrawal\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"withdrawal_frequency\",\n type: \"uint256\",\n },\n {\n internalType: \"string\",\n name: \"contract_name\",\n type: \"string\",\n },\n ],\n internalType: \"struct ContractMeta\",\n name: \"_meta\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"_recipient\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"_partner\",\n type: \"address\",\n },\n ],\n name: \"create\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_address\",\n type: \"address\",\n },\n ],\n name: \"feesRemove\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_address\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"streamflow_fee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee\",\n type: \"uint256\",\n },\n ],\n name: \"feesWrite\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAdmin\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAll\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"cancelable_by_sender\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"cancelable_by_recipient\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"transferable_by_sender\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"transferable_by_recipient\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"can_topup\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"pausable\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"can_update_rate\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"automatic_withdrawal\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"withdrawal_frequency\",\n type: \"uint256\",\n },\n {\n internalType: \"string\",\n name: \"contract_name\",\n type: \"string\",\n },\n ],\n internalType: \"struct ContractMeta\",\n name: \"meta\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount_per_period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"end\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"cliff_amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"withdrawn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"last_withdrawn_at\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"created\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"canceled_at\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"partner\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"streamflow_fee_percentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"streamflow_fee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"streamflow_fee_withdrawn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee_percentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee_withdrawn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"tx_fee\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct FeesData\",\n name: \"fees\",\n type: \"tuple\",\n },\n {\n internalType: \"bool\",\n name: \"closed\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"current_pause_start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pause_cumulative\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"last_rate_change_time\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"funds_unlocked_at_last_rate_change\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct Contract[]\",\n name: \"\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_id\",\n type: \"address\",\n },\n ],\n name: \"getById\",\n outputs: [\n {\n components: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"cancelable_by_sender\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"cancelable_by_recipient\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"transferable_by_sender\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"transferable_by_recipient\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"can_topup\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"pausable\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"can_update_rate\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"automatic_withdrawal\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"withdrawal_frequency\",\n type: \"uint256\",\n },\n {\n internalType: \"string\",\n name: \"contract_name\",\n type: \"string\",\n },\n ],\n internalType: \"struct ContractMeta\",\n name: \"meta\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount_per_period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"end\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"cliff_amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"withdrawn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"last_withdrawn_at\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"created\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"canceled_at\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"partner\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"streamflow_fee_percentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"streamflow_fee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"streamflow_fee_withdrawn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee_percentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee_withdrawn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"tx_fee\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct FeesData\",\n name: \"fees\",\n type: \"tuple\",\n },\n {\n internalType: \"bool\",\n name: \"closed\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"current_pause_start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pause_cumulative\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"last_rate_change_time\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"funds_unlocked_at_last_rate_change\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct Contract\",\n name: \"\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_recipient\",\n type: \"address\",\n },\n ],\n name: \"getByRecipient\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"\",\n type: \"address[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_sender\",\n type: \"address\",\n },\n ],\n name: \"getBySender\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"\",\n type: \"address[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_address\",\n type: \"address\",\n },\n ],\n name: \"getFees\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"exists\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"streamflow_fee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct StreamflowFeeManager.FeeValue\",\n name: \"\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"_ids\",\n type: \"address[]\",\n },\n ],\n name: \"getMultiple\",\n outputs: [\n {\n components: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"cancelable_by_sender\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"cancelable_by_recipient\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"transferable_by_sender\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"transferable_by_recipient\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"can_topup\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"pausable\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"can_update_rate\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"automatic_withdrawal\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"withdrawal_frequency\",\n type: \"uint256\",\n },\n {\n internalType: \"string\",\n name: \"contract_name\",\n type: \"string\",\n },\n ],\n internalType: \"struct ContractMeta\",\n name: \"meta\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount_per_period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"end\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"cliff_amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"withdrawn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"last_withdrawn_at\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"created\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"canceled_at\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"partner\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"streamflow_fee_percentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"streamflow_fee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"streamflow_fee_withdrawn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee_percentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"partner_fee_withdrawn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"tx_fee\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct FeesData\",\n name: \"fees\",\n type: \"tuple\",\n },\n {\n internalType: \"bool\",\n name: \"closed\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"current_pause_start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pause_cumulative\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"last_rate_change_time\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"funds_unlocked_at_last_rate_change\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct Contract[]\",\n name: \"\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_address\",\n type: \"address\",\n },\n ],\n name: \"getStreamflowFee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getStreamflowFees\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_stream_id\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_amount\",\n type: \"uint256\",\n },\n ],\n name: \"getTopUpWithdrawalFees\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"tx_fee\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct WithdrawalFeesData\",\n name: \"\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTreasuryAddress\",\n outputs: [\n {\n internalType: \"address payable\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTxFee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_amount_per_period\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_cliff_amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"_automatic_withdrawal\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"_withdrawal_frequency\",\n type: \"uint256\",\n },\n ],\n name: \"getWithdrawalFees\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"tx_fee\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct WithdrawalFeesData\",\n name: \"\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWithdraworAddress\",\n outputs: [\n {\n internalType: \"address payable\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_stream_id\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_amount\",\n type: \"uint256\",\n },\n ],\n name: \"topUp\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_stream_id\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"new_recipient\",\n type: \"address\",\n },\n ],\n name: \"transfer\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_new_admin\",\n type: \"address\",\n },\n ],\n name: \"transferAdmin\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_stream_id\",\n type: \"address\",\n },\n {\n internalType: \"bool[]\",\n name: \"_automatic_withdrawal\",\n type: \"bool[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"_withdrawal_frequency\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"_amount_per_period\",\n type: \"uint256[]\",\n },\n ],\n name: \"update\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_stream_id\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_amount\",\n type: \"uint256\",\n },\n ],\n name: \"withdraw\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n];\n","export default [\n {\n constant: true,\n inputs: [],\n name: \"name\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n },\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n name: \"balance\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n {\n name: \"_spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n payable: true,\n stateMutability: \"payable\",\n type: \"fallback\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\n","import BN from \"bn.js\";\n\nexport const MAX_SAFE_UNIX_TIME_VALUE = 8640000000000;\n\nexport const BASE_FEE = 1009900; // Buffer to include usual fees when calculating stream amount\nexport const WITHDRAW_AVAILABLE_AMOUNT = new BN(\"18446744073709551615\"); // Magical number to withdraw all available amount from a Contract\n","import BN from \"bn.js\";\n\nimport {\n type AlignedStream,\n type ICreateAlignedStreamData,\n type ICreateStreamData,\n type Stream,\n StreamType,\n} from \"./types.js\";\nimport { MAX_SAFE_UNIX_TIME_VALUE } from \"./constants.js\";\n\ninterface ICalculateUnlockedAmount {\n depositedAmount: BN;\n cliff: number;\n cliffAmount: BN;\n end: number;\n currentTimestamp: number;\n lastRateChangeTime: number;\n period: number;\n amountPerPeriod: BN;\n fundsUnlockedAtLastRateChange: BN;\n}\n\nexport const calculateUnlockedAmount = ({\n depositedAmount,\n cliff,\n cliffAmount,\n end,\n currentTimestamp,\n lastRateChangeTime,\n period,\n amountPerPeriod,\n fundsUnlockedAtLastRateChange,\n}: ICalculateUnlockedAmount): BN => {\n const deposited = depositedAmount;\n\n if (currentTimestamp < cliff) return new BN(0);\n if (currentTimestamp > end) return deposited;\n\n const savedUnlockedFunds = lastRateChangeTime === 0 ? cliffAmount : fundsUnlockedAtLastRateChange;\n const savedUnlockedFundsTime = lastRateChangeTime === 0 ? cliff : lastRateChangeTime;\n\n const streamed = new BN(Math.floor((currentTimestamp - savedUnlockedFundsTime) / period))\n .mul(amountPerPeriod)\n .add(savedUnlockedFunds);\n\n return streamed.lt(deposited) ? streamed : deposited;\n};\n\nexport const isCliffCloseToDepositedAmount = (streamData: { depositedAmount: BN; cliffAmount: BN }): boolean => {\n return streamData.cliffAmount.gte(streamData.depositedAmount.sub(new BN(1)));\n};\n\nexport const isPayment = (streamData: { canTopup: boolean }): boolean => {\n return streamData.canTopup;\n};\n\nexport const isVesting = (streamData: {\n canTopup: boolean;\n depositedAmount: BN;\n cliffAmount: BN;\n minPrice?: number;\n maxPrice?: number;\n minPercentage?: number;\n maxPercentage?: number;\n}): boolean => {\n return (\n !streamData.canTopup &&\n !isCliffCloseToDepositedAmount(streamData) &&\n !isDynamicLock(streamData.minPrice, streamData.maxPrice, streamData.minPercentage, streamData.maxPercentage)\n );\n};\n\nexport const isAligned = (stream: Stream): stream is AlignedStream => {\n return \"minPrice\" in stream && \"maxPrice\" in stream && \"minPercentage\" in stream && \"maxPercentage\" in stream;\n};\n\nexport const isCreateAlignedStreamData = (obj: ICreateStreamData): obj is ICreateAlignedStreamData => {\n return \"minPrice\" in obj && \"maxPrice\" in obj && \"minPercentage\" in obj && \"maxPercentage\" in obj;\n};\n\nexport const isDynamicLock = (\n minPrice?: number,\n maxPrice?: number,\n minPercentage?: number,\n maxPercentage?: number,\n): boolean => {\n return (\n !!minPrice && !!maxPrice && minPrice > 0 && maxPrice - minPrice <= 1 && minPercentage === 0 && maxPercentage === 100\n );\n};\n\nexport const isTokenLock = (streamData: {\n canTopup: boolean;\n automaticWithdrawal: boolean;\n cancelableBySender: boolean;\n cancelableByRecipient: boolean;\n transferableBySender: boolean;\n transferableByRecipient: boolean;\n depositedAmount: BN;\n cliffAmount: BN;\n minPrice?: number;\n maxPrice?: number;\n minPercentage?: number;\n maxPercentage?: number;\n}): boolean => {\n return (\n !streamData.canTopup &&\n !streamData.automaticWithdrawal &&\n !streamData.cancelableBySender &&\n !streamData.cancelableByRecipient &&\n !streamData.transferableBySender &&\n !streamData.transferableByRecipient &&\n (isCliffCloseToDepositedAmount(streamData) ||\n isDynamicLock(streamData.minPrice, streamData.maxPrice, streamData.minPercentage, streamData.maxPercentage))\n );\n};\n\nexport const buildStreamType = (streamData: {\n canTopup: boolean;\n automaticWithdrawal: boolean;\n cancelableBySender: boolean;\n cancelableByRecipient: boolean;\n transferableBySender: boolean;\n transferableByRecipient: boolean;\n depositedAmount: BN;\n cliffAmount: BN;\n minPrice?: number;\n maxPrice?: number;\n minPercentage?: number;\n maxPercentage?: number;\n}): StreamType => {\n if (isVesting(streamData)) {\n return StreamType.Vesting;\n }\n if (isTokenLock(streamData)) {\n return StreamType.Lock;\n }\n return StreamType.Payment;\n};\n\nexport const decodeEndTime = (endTime: BN): number => {\n if (endTime.gt(new BN(MAX_SAFE_UNIX_TIME_VALUE))) {\n return MAX_SAFE_UNIX_TIME_VALUE;\n }\n return endTime.toNumber();\n};\n","import BN from \"bn.js\";\n\nimport { ContractError } from \"./types.js\";\n\nconst FEE_PRECISION = 4;\nconst FEE_NORMALIZER = 10 ** FEE_PRECISION;\nconst FEE_MULTIPLIER = new BN(10 ** 6);\n\n/**\n * Used for conversion of token amounts to their Big Number representation.\n * Get Big Number representation in the smallest units from the same value in the highest units.\n * @param {number} value - Number of tokens you want to convert to its BN representation.\n * @param {number} decimals - Number of decimals the token has.\n */\nexport const getBN = (value: number, decimals: number): BN => {\n const decimalPart = value - Math.trunc(value);\n const integerPart = new BN(Math.trunc(value));\n\n const decimalE = new BN(decimalPart * 1e9);\n\n const sum = integerPart.mul(new BN(1e9)).add(decimalE);\n const resultE = sum.mul(new BN(10).pow(new BN(decimals)));\n return resultE.div(new BN(1e9));\n};\n\n/**\n * Used for token amounts conversion from their Big Number representation to number.\n * Get value in the highest units from BN representation of the same value in the smallest units.\n * @param {BN} value - Big Number representation of value in the smallest units.\n * @param {number} decimals - Number of decimals the token has.\n */\nexport const getNumberFromBN = (value: BN, decimals: number): number =>\n value.gt(new BN(2 ** 53 - 1)) ? value.div(new BN(10 ** decimals)).toNumber() : value.toNumber() / 10 ** decimals;\n\n/**\n * Calculate total amount of a Contract including all fees.\n * - first we convert fee floating to a BN with up to 4 decimals precision\n * - then we reverse the fee with `FEE_MULTIPLIER` to safely multiply it by depositedAmount\n * to receive a total number and not percentage of depositedAmount\n * @param depositedAmount deposited raw tokens\n * @param totalFee sum of all fees in percentage as floating number, e.g. 0.99% should be supplied as 0.99\n * @returns total tokens amount that Contract will retrieve from the Sender\n */\nexport const calculateTotalAmountToDeposit = (depositedAmount: BN, totalFee: number): BN => {\n const totalFeeNormalized = new BN(totalFee * FEE_NORMALIZER);\n return depositedAmount.mul(totalFeeNormalized.add(FEE_MULTIPLIER)).div(FEE_MULTIPLIER);\n};\n\n/**\n * Used to make on chain calls to the contract and wrap raised errors if any\n * @param func function that interacts with the contract\n * @param callback callback that may be used to extract error code\n * @returns {T}\n */\nexport async function handleContractError<T>(\n func: () => Promise<T>,\n callback?: (err: Error) => string | null,\n): Promise<T> {\n try {\n return await func();\n } catch (err: unknown) {\n if (err instanceof Error) {\n if (callback) {\n throw new ContractError(err, callback(err));\n }\n throw new ContractError(err);\n }\n throw err;\n }\n}\n","import BN from \"bn.js\";\nimport type { BigNumber as BigNumberEvm } from \"ethers\";\n\nimport { buildStreamType, calculateUnlockedAmount } from \"../common/contractUtils.js\";\nimport type { LinearStream, StreamType } from \"../common/types.js\";\nimport { getNumberFromBN } from \"../common/utils.js\";\n\nexport interface StreamAbiResult {\n amount: BigNumberEvm;\n amount_per_period: BigNumberEvm;\n canceled_at: BigNumberEvm;\n cliff_amount: BigNumberEvm;\n closed: boolean;\n created: BigNumberEvm;\n current_pause_start: BigNumberEvm;\n end: BigNumberEvm;\n fees: {\n streamflow_fee_percentage: BigNumberEvm;\n streamflow_fee: BigNumberEvm;\n streamflow_fee_withdrawn: BigNumberEvm;\n partner_fee_percentage: BigNumberEvm;\n partner_fee: BigNumberEvm;\n partner_fee_withdrawn: BigNumberEvm;\n tx_fee: BigNumberEvm;\n };\n funds_unlocked_at_last_rate_change: BigNumberEvm;\n last_rate_change_time: BigNumberEvm;\n last_withdrawn_at: BigNumberEvm;\n meta: {\n automatic_withdrawal: boolean;\n can_topup: boolean;\n can_update_rate: boolean;\n cancelable_by_recipient: boolean;\n cancelable_by_sender: boolean;\n contract_name: string;\n pausable: boolean;\n transferable_by_recipient: boolean;\n transferable_by_sender: boolean;\n withdrawal_frequency: BigNumberEvm;\n };\n pause_cumulative: BigNumberEvm;\n period: BigNumberEvm;\n recipient: string;\n sender: string;\n partner: string;\n start: BigNumberEvm;\n token: string;\n withdrawn: BigNumberEvm;\n}\n\nexport interface FeesAbiResult {\n exists: boolean;\n streamflow_fee: BigNumberEvm;\n partner_fee: BigNumberEvm;\n}\n\nexport class EvmContract implements LinearStream {\n magic: number;\n\n version: number;\n\n createdAt: number;\n\n withdrawnAmount: BN;\n\n canceledAt: number;\n\n end: number;\n\n lastWithdrawnAt: number;\n\n sender: string;\n\n senderTokens: string;\n\n recipient: string;\n\n recipientTokens: string;\n\n mint: string;\n\n escrowTokens: string;\n\n streamflowTreasury: string;\n\n streamflowTreasuryTokens: string;\n\n streamflowFeeTotal: BN;\n\n streamflowFeeWithdrawn: BN;\n\n streamflowFeePercent: number;\n\n partnerFeeTotal: BN;\n\n partnerFeeWithdrawn: BN;\n\n partnerFeePercent: number;\n\n partner: string;\n\n partnerTokens: string;\n\n start: number;\n\n depositedAmount: BN;\n\n period: number;\n\n amountPerPeriod: BN;\n\n cliff: number;\n\n cliffAmount: BN;\n\n cancelableBySender: boolean;\n\n cancelableByRecipient: boolean;\n\n automaticWithdrawal: boolean;\n\n transferableBySender: boolean;\n\n transferableByRecipient: boolean;\n\n canTopup: boolean;\n\n name: string;\n\n withdrawalFrequency: number;\n\n closed: boolean;\n\n currentPauseStart: number;\n\n pauseCumulative: BN;\n\n lastRateChangeTime: number;\n\n fundsUnlockedAtLastRateChange: BN;\n\n type: StreamType;\n\n constructor(stream: StreamAbiResult) {\n this.magic = 0;\n this.version = 0;\n this.createdAt = stream.created.toNumber();\n this.withdrawnAmount = new BN(stream.withdrawn.toString());\n this.canceledAt = stream.canceled_at.toNumber();\n this.end = stream.end.toNumber();\n this.lastWithdrawnAt = stream.last_withdrawn_at.toNumber();\n this.sender = stream.sender;\n this.senderTokens = stream.sender;\n this.recipient = stream.recipient;\n this.recipientTokens = stream.recipient;\n this.mint = stream.token.toLowerCase();\n this.escrowTokens = \"\";\n this.streamflowTreasury = \"\";\n this.streamflowTreasuryTokens = \"\";\n this.streamflowFeeTotal = new BN(stream.fees.streamflow_fee.toString());\n this.streamflowFeeWithdrawn = new BN(stream.fees.streamflow_fee_withdrawn.toString());\n this.streamflowFeePercent = stream.fees.streamflow_fee_percentage.toNumber() / 10000;\n this.partnerFeeTotal = new BN(0);\n this.partnerFeeWithdrawn = new BN(0);\n this.partnerFeePercent = 0;\n this.partner = \"\";\n this.partnerTokens = \"\";\n this.start = stream.start.toNumber();\n this.depositedAmount = new BN(stream.amount.toString());\n this.period = stream.period.toNumber();\n this.amountPerPeriod = new BN(stream.amount_per_period.toString());\n this.cliff = stream.start.toNumber();\n this.cliffAmount = new BN(stream.cliff_amount.toString());\n this.cancelableBySender = stream.meta.cancelable_by_sender;\n this.cancelableByRecipient = stream.meta.cancelable_by_recipient;\n this.automaticWithdrawal = stream.meta.automatic_withdrawal;\n this.transferableBySender = stream.meta.transferable_by_sender;\n this.transferableByRecipient = stream.meta.transferable_by_recipient;\n this.canTopup = stream.meta.can_topup;\n this.name = stream.meta.contract_name;\n this.withdrawalFrequency = stream.meta.withdrawal_frequency.toNumber();\n this.closed = stream.closed;\n this.currentPauseStart = stream.current_pause_start.toNumber();\n this.pauseCumulative = new BN(stream.pause_cumulative.toString());\n this.lastRateChangeTime = stream.last_rate_change_time.toNumber();\n this.fundsUnlockedAtLastRateChange = new BN(stream.funds_unlocked_at_last_rate_change.toString());\n this.type = buildStreamType(this);\n }\n\n unlocked(currentTimestamp: number): BN {\n return calculateUnlockedAmount({\n ...this,\n currentTimestamp,\n });\n }\n\n remaining(decimals: number): number {\n return getNumberFromBN(this.depositedAmount.sub(this.withdrawnAmount), decimals);\n }\n}\n","import { EVM_ERROR_MATCH_REGEX } from \"./constants.js\";\n\nexport function extractEvmErrorCode(errorText: string): string | null {\n const match = EVM_ERROR_MATCH_REGEX.exec(errorText);\n\n if (!match) {\n return null;\n }\n\n return match[1];\n}\n","import { ethers } from \"ethers\";\nimport BN from \"bn.js\";\nimport { toChecksumAddress } from \"ethereum-checksum-address\";\n\nimport { BaseStreamClient } from \"../common/BaseStreamClient.js\";\nimport {\n type ICancelData,\n IChain,\n ICluster,\n type ICreateMultipleStreamData,\n type ICreateResult,\n type ICreateStreamData,\n type IGetFeesData,\n type IGetAllData,\n type IGetOneData,\n type IFees,\n type IMultiTransactionResult,\n type IRecipient,\n type ITopUpData,\n type ITransactionResult,\n type ITransferData,\n type IUpdateData,\n type IWithdrawData,\n type Stream,\n StreamDirection,\n} from \"../common/types.js\";\nimport { BNB_PROGRAM_IDS, ETHEREUM_PROGRAM_IDS, POLYGON_PROGRAM_IDS } from \"./constants.js\";\nimport abi from \"./abi.js\";\nimport ercAbi from \"./ercAbi.js\";\nimport { BASE_FEE, WITHDRAW_AVAILABLE_AMOUNT } from \"../common/constants.js\";\nimport { EvmContract, type FeesAbiResult, type StreamAbiResult } from \"./types.js\";\nimport { extractEvmErrorCode } from \"./utils.js\";\n\nexport default class EvmStreamClient extends BaseStreamClient {\n private programId: string;\n\n private provider: ethers.providers.JsonRpcProvider;\n\n private signer: ethers.Signer;\n\n private readContract: ethers.Contract;\n\n private writeContract: ethers.Contract;\n\n constructor(\n clusterUrl: string,\n chain: IChain,\n signer: ethers.Signer,\n cluster: ICluster = ICluster.Mainnet,\n programId?: string,\n ) {\n super();\n\n if (chain !== IChain.Ethereum && chain !== IChain.BNB && chain !== IChain.Polygon) {\n throw new Error(\"Wrong chain. Supported chains are Ethereum , BNB and Polygon!\");\n }\n\n if (programId) {\n this.programId = programId;\n } else {\n switch (chain) {\n case IChain.Ethereum:\n this.programId = ETHEREUM_PROGRAM_IDS[cluster];\n break;\n case IChain.BNB:\n this.programId = BNB_PROGRAM_IDS[cluster];\n break;\n case IChain.Polygon:\n this.programId = POLYGON_PROGRAM_IDS[cluster];\n break;\n }\n }\n\n this.provider = new ethers.providers.JsonRpcProvider(clusterUrl);\n this.signer = signer;\n\n const baseContract = new ethers.Contract(this.programId, abi);\n this.readContract = baseContract.connect(this.provider);\n this.writeContract = baseContract.connect(this.signer);\n }\n\n public async create(streamData: ICreateStreamData): Promise<ICreateResult> {\n const multiParams = {\n ...streamData,\n recipients: [streamData],\n };\n\n const fees = await this.readContract.getWithdrawalFees(...this.getFeeParams(multiParams));\n\n const args = (await this.generateMultiPayloads(multiParams))[0];\n\n const sum = streamData.amount.mul(new BN(BASE_FEE)).div(new BN(1000000));\n\n await this.approveTokens(streamData.tokenId, sum);\n\n const result = await this.writeContract.create(...args, {\n value: fees.value,\n });\n\n const confirmedTx = await result.wait();\n\n const metadataId = this.formatMetadataId(\n confirmedTx.events!.find((item: ethers.Event) => item.event === \"ContractCreated\")!.args![0],\n );\n\n return {\n ixs: [],\n txId: result.hash,\n metadataId,\n };\n }\n\n public async createMultiple(multipleStreamData: ICreateMultipleStreamData): Promise<IMultiTransactionResult> {\n const fees = await this.readContract.getWithdrawalFees(...this.getFeeParams(multipleStreamData));\n\n const args = await this.generateMultiPayloads(multipleStreamData);\n\n const sum = multipleStreamData.recipients\n .reduce((acc, v) => acc.add(v.amount), new BN(0))\n .mul(new BN(BASE_FEE))\n .div(new BN(1000000));\n await this.approveTokens(multipleStreamData.tokenId, sum);\n\n const creationPromises = args.map((item) => this.writeContract.create(...item, { value: fees.value }));\n\n const signatures: string[] = [];\n const results = await Promise.all(creationPromises);\n\n const confirmations = await Promise.allSettled(results.map((result) => result.wait()));\n const successes = confirmations\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .filter((el): el is PromiseFulfilledResult<any> => el.status === \"fulfilled\")\n .map((el) => el.value);\n signatures.push(...successes.map((el) => el.hash));\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const metadatas = confirmations.map((result: PromiseSettledResult<any>) =>\n result.status === \"fulfilled\"\n ? this.formatMetadataId(\n result.value.events!.find((item: ethers.Event) => item.event === \"ContractCreated\")!.args![0],\n )\n : null,\n );\n const metadataToRecipient = metadatas.reduce(\n (acc, value, index) => {\n if (value) {\n acc[value] = multipleStreamData.recipients[index];\n }\n\n return acc;\n },\n {} as Record<string, IRecipient>,\n );\n\n const failures = confirmations\n .filter((el): el is PromiseRejectedResult => el.status === \"rejected\")\n .map((el) => el.reason);\n\n return {\n txs: signatures,\n metadatas: metadatas.filter(Boolean) as string[],\n metadataToRecipient,\n errors: failures,\n };\n }\n\n public async withdraw({ id, amount = WITHDRAW_AVAILABLE_AMOUNT }: IWithdrawData): Promise<ITransactionResult> {\n const result = await this.writeContract.withdraw(id, amount.toString());\n return {\n ixs: [],\n txId: result.hash,\n };\n }\n\n public async cancel(cancelData: ICancelData): Promise<ITransactionResult> {\n const result = await this.writeContract.cancel(cancelData.id);\n return {\n ixs: [],\n txId: result.hash,\n };\n }\n\n public async transfer(transferData: ITransferData): Promise<ITransactionResult> {\n const result = await this.writeContract.transfer(transferData.id, transferData.newRecipient);\n return {\n ixs: [],\n txId: result.hash,\n };\n }\n\n public async topup(topupData: ITopUpData): Promise<ITransactionResult> {\n const fees = await this.readContract.getTopUpWithdrawalFees(topupData.id, topupData.amount.toString());\n\n const sum = topupData.amount.mul(new BN(BASE_FEE)).div(new BN(1000000));\n\n const stream = await this.getOne({ id: topupData.id });\n\n await this.approveTokens(stream.mint, sum);\n\n const result = await this.writeContract.topUp(topupData.id, topupData.amount.toString(), {\n value: fees.value,\n });\n return {\n ixs: [],\n txId: result.hash,\n };\n }\n\n public async update(updateData: IUpdateData): Promise<ITransactionResult> {\n const result = await this.writeContract.update(\n updateData.id,\n updateData.enableAutomaticWithdrawal ? [true] : [],\n updateData.withdrawFrequency ? [updateData.withdrawFrequency.toString()] : [],\n updateData.amountPerPeriod ? [updateData.amountPerPeriod.toString()] : [],\n );\n return {\n ixs: [],\n txId: result.hash,\n };\n }\n\n public async getOne({ id }: IGetOneData): Promise<Stream> {\n const result: StreamAbiResult = await this.readContract.getById(id);\n return new EvmContract(result);\n }\n\n public async get({\n address,\n // type = StreamType.All,\n direction = StreamDirection.All,\n }: IGetAllData): Promise<[string, Stream][]> {\n const addresses: string[] = [];\n if (direction === StreamDirection.All || direction === StreamDirection.Outgoing) {\n const senderAddresses = await this.readContract.getBySender(address);\n addresses.push(...senderAddresses);\n }\n if (direction === StreamDirection.All || direction === StreamDirection.Incoming) {\n const recipientAddresses = await this.readContract.getByRecipient(address);\n addresses.push(...recipientAddresses);\n }\n const uniqueAddresses = [...new Set(addresses)];\n const results: StreamAbiResult[] = await this.readContract.getMultiple(uniqueAddresses);\n return results.map((result, index) => [uniqueAddresses[index], new EvmContract(result)]);\n }\n\n public extractErrorCode(err: Error): string | null {\n return extractEvmErrorCode(err.toString() ?? \"Unknown error!\");\n }\n\n public async getFees({ address }: IGetFeesData): Promise<IFees | null> {\n const fees: FeesAbiResult = await this.readContract.getFees(address);\n if (!fees.exists) {\n return null;\n }\n return {\n streamflowFee: fees.streamflow_fee.toNumber() / 100,\n partnerFee: fees.partner_fee.toNumber() / 100,\n };\n }\n\n public async getDefaultStreamflowFee(): Promise<number> {\n const fee = await this.readContract.getStreamflowFees();\n return fee.toNumber() / 100;\n }\n\n /**\n * Returns StreamClient protocol program ID.\n */\n public getProgramId(): string {\n return this.programId;\n }\n\n public async approveTokens(tokenId: string, amount: BN): Promise<void> {\n const tokenContract = new ethers.Contract(tokenId, ercAbi, this.signer);\n const address = await this.signer.getAddress();\n const allowance = await tokenContract.allowance(address, this.programId);\n if (new BN(allowance.toString()).gte(amount)) {\n return;\n }\n const approvalTx = await tokenContract.approve(this.programId, amount.toString());\n await approvalTx.wait();\n }\n\n // Utility function to prepare transaction payloads for multiple recipients.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private async generateMultiPayloads(multipleStreamData: ICreateMultipleStreamData): Promise<any[]> {\n const sender = await this.signer.getAddress();\n return multipleStreamData.recipients.map((recipient) => {\n return [\n multipleStreamData.tokenId,\n recipient.amount.toString(),\n multipleStreamData.period,\n recipient.amountPerPeriod.toString(),\n multipleStreamData.start,\n recipient.cliffAmount.toString(),\n [\n multipleStreamData.cancelableBySender,\n multipleStreamData.cancelableByRecipient,\n multipleStreamData.transferableBySender,\n multipleStreamData.transferableByRecipient,\n multipleStreamData.canTopup,\n multipleStreamData.canPause || false,\n multipleStreamData.canUpdateRate || false,\n multipleStreamData.automaticWithdrawal || false,\n multipleStreamData.withdrawalFrequency || 0,\n recipient.name,\n ],\n recipient.recipient,\n multipleStreamData.partner || sender,\n ];\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private getFeeParams(multipleStreamData: ICreateMultipleStreamData): any[] {\n return [\n multipleStreamData.recipients[0].amount.toString(),\n multipleStreamData.period,\n multipleStreamData.recipients[0].amountPerPeriod.toString(),\n multipleStreamData.start,\n multipleStreamData.recipients[0].cliffAmount.toString(),\n multipleStreamData.automaticWithdrawal || false,\n multipleStreamData.withdrawalFrequency || 0,\n ];\n }\n\n private formatMetadataId(id: string): string {\n // 40 chars is ethereum address size\n return toChecksumAddress(`0x${id.slice(-40)}`);\n }\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { a as EvmContract, E as EvmStreamClient, F as FeesAbiResult, S as StreamAbiResult, c as constants, E as default, _ as ercAbi, e as extractEvmErrorCode } from '../index-fNLnPKzv.cjs';
|
|
2
|
+
import 'ethers';
|
|
3
|
+
import 'bn.js';
|
|
4
|
+
import '../BaseStreamClient-CQOC8m8V.cjs';
|
|
5
|
+
import '@coral-xyz/anchor';
|
|
6
|
+
import '@solana/web3.js';
|
|
7
|
+
import '@streamflow/common';
|
|
8
|
+
import 'p-queue';
|
|
9
|
+
import 'aptos';
|
|
10
|
+
import '@mysten/sui/cryptography';
|
|
11
|
+
import '@mysten/sui/transactions';
|
|
12
|
+
import '@mysten/sui/client';
|
|
13
|
+
import '@suiet/wallet-kit';
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { B as BaseStreamClient, N as ISuiIdParameters, I as ICreateStreamData, f as ICreateStreamSuiExt, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, k as ITransactionSuiExt, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, P as Contract, r as IUpdateData, s as IGetFeesData, t as IFees, Q as SuiErrorInfo, R as ClassResource, T as FeeTableResource, U as FeeValueResource, V as IContractCreated, W as IContractWithdrawn, X as StreamResource, Y as SuiParsedError, Z as SuiSignAndExecuteTransactionBlockInput } from './BaseStreamClient-CQOC8m8V.cjs';
|
|
2
|
+
import { ICluster } from '@streamflow/common';
|
|
3
|
+
import { SuiClient, GetTransactionBlockParams, SuiTransactionBlockResponse } from '@mysten/sui/client';
|
|
4
|
+
|
|
5
|
+
declare class SuiStreamClient extends BaseStreamClient {
|
|
6
|
+
private programId;
|
|
7
|
+
private configId;
|
|
8
|
+
private feeTableId;
|
|
9
|
+
private client;
|
|
10
|
+
constructor(clusterUrl: string, cluster?: ICluster, ids?: ISuiIdParameters);
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new stream/vesting contract.
|
|
13
|
+
*/
|
|
14
|
+
create(streamData: ICreateStreamData, { senderWallet }: ICreateStreamSuiExt): Promise<ICreateResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Creates multiple stream/vesting contracts.
|
|
17
|
+
* We don't chain transactions in one Block so that one failed transaction does not revert all others.
|
|
18
|
+
*/
|
|
19
|
+
createMultiple(multipleStreamData: ICreateMultipleStreamData, { senderWallet }: ICreateStreamSuiExt): Promise<IMultiTransactionResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Attempts withdrawing from the specified stream.
|
|
22
|
+
*/
|
|
23
|
+
withdraw({ id, amount }: IWithdrawData, { senderWallet, tokenId }: ITransactionSuiExt): Promise<ITransactionResult>;
|
|
24
|
+
/**
|
|
25
|
+
* Attempts canceling the specified stream.
|
|
26
|
+
*/
|
|
27
|
+
cancel(cancelData: ICancelData, { senderWallet, tokenId }: ITransactionSuiExt): Promise<ITransactionResult>;
|
|
28
|
+
/**
|
|
29
|
+
* Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract).
|
|
30
|
+
*/
|
|
31
|
+
transfer(transferData: ITransferData, { senderWallet, tokenId }: ITransactionSuiExt): Promise<ITransactionResult>;
|
|
32
|
+
/**
|
|
33
|
+
* Tops up stream account with specified amount.
|
|
34
|
+
*/
|
|
35
|
+
topup(topupData: ITopUpData, { senderWallet, tokenId }: ITransactionSuiExt): Promise<ITransactionResult>;
|
|
36
|
+
/**
|
|
37
|
+
* Fetch stream data by its id (address).
|
|
38
|
+
*/
|
|
39
|
+
getOne({ id }: IGetOneData): Promise<Contract>;
|
|
40
|
+
get(): Promise<[string, Contract][]>;
|
|
41
|
+
/**
|
|
42
|
+
* Attempts updating the stream auto withdrawal params and amount per period
|
|
43
|
+
*/
|
|
44
|
+
update(updateData: IUpdateData, { senderWallet, tokenId }: ITransactionSuiExt): Promise<ITransactionResult>;
|
|
45
|
+
extractErrorCode(err: Error): string | null;
|
|
46
|
+
getFees({ address }: IGetFeesData): Promise<IFees | null>;
|
|
47
|
+
getDefaultStreamflowFee(): Promise<number>;
|
|
48
|
+
/**
|
|
49
|
+
* Returns StreamClient protocol program ID.
|
|
50
|
+
*/
|
|
51
|
+
getProgramId(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Utility function to generate Transaction Block to create streams
|
|
54
|
+
*/
|
|
55
|
+
private generateCreateBlock;
|
|
56
|
+
/**
|
|
57
|
+
* Returns all coins owned by a Wallet
|
|
58
|
+
* @param walletAddress wallet address
|
|
59
|
+
* @param coinType coin type
|
|
60
|
+
* @returns Array of Coin Structs
|
|
61
|
+
*/
|
|
62
|
+
private getAllCoins;
|
|
63
|
+
/**
|
|
64
|
+
* Utility function to split Coin object and use splitted object for stream operations.
|
|
65
|
+
* We do it like thid to mitigate risk of Transaction reverting in case Stream is created for Sui Coin object.
|
|
66
|
+
* This way we can safely pass splitted Sui Coin object in Stream payload and use another object for gas/withdrawal fees.
|
|
67
|
+
* @param tx current transanction block
|
|
68
|
+
* @param amount minimal amount of coins requried
|
|
69
|
+
* @param coinType coin type
|
|
70
|
+
* @param coins array of owned coins of the same type
|
|
71
|
+
* @param totalFee partner and treasury fees
|
|
72
|
+
* @returns Coin Object to use in a Move Call
|
|
73
|
+
*/
|
|
74
|
+
private splitCoinObjectForAmount;
|
|
75
|
+
/**
|
|
76
|
+
* Return previously splitted Coin Object to owner and merge it to to rebate storage fees
|
|
77
|
+
* @param tx current transaction
|
|
78
|
+
* @param coinType coin type
|
|
79
|
+
* @param coinObject splitted object
|
|
80
|
+
* @param coins array of objects used in
|
|
81
|
+
*/
|
|
82
|
+
private returnSplittedCoinObject;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare function extractSuiErrorInfo(errorText: string): SuiErrorInfo;
|
|
86
|
+
/**
|
|
87
|
+
* Fetches transaction block with a retry:
|
|
88
|
+
* retries `Could not find the referenced transaction` error as it could be that some validators still don't have the tx;
|
|
89
|
+
*
|
|
90
|
+
* @param client sui client to use
|
|
91
|
+
* @param input transaction fetch payload,
|
|
92
|
+
*/
|
|
93
|
+
declare function getTransactionBlock(client: SuiClient, input: GetTransactionBlockParams): Promise<SuiTransactionBlockResponse>;
|
|
94
|
+
|
|
95
|
+
declare const SUI_PROGRAM_IDS: Record<ICluster, string>;
|
|
96
|
+
declare const SUI_CONFIG_IDS: Record<ICluster, string>;
|
|
97
|
+
declare const SUI_FEE_TABLE_IDS: Record<ICluster, string>;
|
|
98
|
+
declare const SUI_ERROR_MATCH_REGEX: RegExp;
|
|
99
|
+
declare const SUI_MODULE_ERROR_MAP: {
|
|
100
|
+
[key: string]: {
|
|
101
|
+
[key: number]: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
declare const constants_SUI_CONFIG_IDS: typeof SUI_CONFIG_IDS;
|
|
106
|
+
declare const constants_SUI_ERROR_MATCH_REGEX: typeof SUI_ERROR_MATCH_REGEX;
|
|
107
|
+
declare const constants_SUI_FEE_TABLE_IDS: typeof SUI_FEE_TABLE_IDS;
|
|
108
|
+
declare const constants_SUI_MODULE_ERROR_MAP: typeof SUI_MODULE_ERROR_MAP;
|
|
109
|
+
declare const constants_SUI_PROGRAM_IDS: typeof SUI_PROGRAM_IDS;
|
|
110
|
+
declare namespace constants {
|
|
111
|
+
export { constants_SUI_CONFIG_IDS as SUI_CONFIG_IDS, constants_SUI_ERROR_MATCH_REGEX as SUI_ERROR_MATCH_REGEX, constants_SUI_FEE_TABLE_IDS as SUI_FEE_TABLE_IDS, constants_SUI_MODULE_ERROR_MAP as SUI_MODULE_ERROR_MAP, constants_SUI_PROGRAM_IDS as SUI_PROGRAM_IDS };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
declare const index_ClassResource: typeof ClassResource;
|
|
115
|
+
declare const index_Contract: typeof Contract;
|
|
116
|
+
declare const index_FeeTableResource: typeof FeeTableResource;
|
|
117
|
+
declare const index_FeeValueResource: typeof FeeValueResource;
|
|
118
|
+
declare const index_IContractCreated: typeof IContractCreated;
|
|
119
|
+
declare const index_IContractWithdrawn: typeof IContractWithdrawn;
|
|
120
|
+
declare const index_ICreateStreamSuiExt: typeof ICreateStreamSuiExt;
|
|
121
|
+
declare const index_ISuiIdParameters: typeof ISuiIdParameters;
|
|
122
|
+
declare const index_ITransactionSuiExt: typeof ITransactionSuiExt;
|
|
123
|
+
declare const index_StreamResource: typeof StreamResource;
|
|
124
|
+
declare const index_SuiErrorInfo: typeof SuiErrorInfo;
|
|
125
|
+
declare const index_SuiParsedError: typeof SuiParsedError;
|
|
126
|
+
declare const index_SuiSignAndExecuteTransactionBlockInput: typeof SuiSignAndExecuteTransactionBlockInput;
|
|
127
|
+
type index_SuiStreamClient = SuiStreamClient;
|
|
128
|
+
declare const index_SuiStreamClient: typeof SuiStreamClient;
|
|
129
|
+
declare const index_constants: typeof constants;
|
|
130
|
+
declare const index_extractSuiErrorInfo: typeof extractSuiErrorInfo;
|
|
131
|
+
declare const index_getTransactionBlock: typeof getTransactionBlock;
|
|
132
|
+
declare namespace index {
|
|
133
|
+
export { index_ClassResource as ClassResource, index_Contract as Contract, index_FeeTableResource as FeeTableResource, index_FeeValueResource as FeeValueResource, index_IContractCreated as IContractCreated, index_IContractWithdrawn as IContractWithdrawn, index_ICreateStreamSuiExt as ICreateStreamSuiExt, index_ISuiIdParameters as ISuiIdParameters, index_ITransactionSuiExt as ITransactionSuiExt, index_StreamResource as StreamResource, index_SuiErrorInfo as SuiErrorInfo, index_SuiParsedError as SuiParsedError, index_SuiSignAndExecuteTransactionBlockInput as SuiSignAndExecuteTransactionBlockInput, index_SuiStreamClient as SuiStreamClient, index_constants as constants, index_extractSuiErrorInfo as extractSuiErrorInfo, index_getTransactionBlock as getTransactionBlock };
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { SuiStreamClient as S, constants as c, extractSuiErrorInfo as e, getTransactionBlock as g, index as i };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { L as LinearStream, b as StreamType, B as BaseStreamClient, I as ICreateStreamData, g as ICreateResult, h as ICreateMultipleStreamData, i as IMultiTransactionResult, j as IWithdrawData, l as ITransactionResult, m as ICancelData, n as ITransferData, o as ITopUpData, p as IGetOneData, r as IUpdateData, s as IGetFeesData, t as IFees } from './BaseStreamClient-CQOC8m8V.cjs';
|
|
2
|
+
import { WalletContextState } from '@manahippo/aptos-wallet-adapter';
|
|
3
|
+
import BN from 'bn.js';
|
|
4
|
+
import { AptosAccount } from 'aptos';
|
|
5
|
+
import { ICluster } from '@streamflow/common';
|
|
6
|
+
|
|
7
|
+
interface ICreateStreamAptosExt {
|
|
8
|
+
senderWallet: WalletContextState | AptosAccount;
|
|
9
|
+
}
|
|
10
|
+
type ITransactionAptosExt = ICreateStreamAptosExt & {
|
|
11
|
+
tokenId: string;
|
|
12
|
+
};
|
|
13
|
+
interface StreamResource {
|
|
14
|
+
amount: string;
|
|
15
|
+
amount_per_period: string;
|
|
16
|
+
canceled_at: string;
|
|
17
|
+
cliff_amount: string;
|
|
18
|
+
closed: boolean;
|
|
19
|
+
contract_signer_cap: {
|
|
20
|
+
account: string;
|
|
21
|
+
};
|
|
22
|
+
created: string;
|
|
23
|
+
current_pause_start: string;
|
|
24
|
+
end: string;
|
|
25
|
+
fees: {
|
|
26
|
+
streamflow_fee: string;
|
|
27
|
+
streamflow_fee_percentage: string;
|
|
28
|
+
streamflow_fee_withdrawn: string;
|
|
29
|
+
};
|
|
30
|
+
funds_unlocked_at_last_rate_change: string;
|
|
31
|
+
last_rate_change_time: string;
|
|
32
|
+
last_withdrawn_at: string;
|
|
33
|
+
meta: {
|
|
34
|
+
automatic_withdrawal: boolean;
|
|
35
|
+
can_topup: boolean;
|
|
36
|
+
can_update_rate: boolean;
|
|
37
|
+
cancelable_by_recipient: boolean;
|
|
38
|
+
cancelable_by_sender: boolean;
|
|
39
|
+
contract_name: string;
|
|
40
|
+
pausable: boolean;
|
|
41
|
+
transferable_by_recipient: boolean;
|
|
42
|
+
transferable_by_sender: boolean;
|
|
43
|
+
withdrawal_frequency: string;
|
|
44
|
+
};
|
|
45
|
+
pause_cumulative: string;
|
|
46
|
+
period: string;
|
|
47
|
+
recipient: string;
|
|
48
|
+
sender: string;
|
|
49
|
+
start: string;
|
|
50
|
+
withdrawn: string;
|
|
51
|
+
}
|
|
52
|
+
interface FeeTableResource {
|
|
53
|
+
values: {
|
|
54
|
+
handle: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
interface ConfigResource {
|
|
58
|
+
admin: string;
|
|
59
|
+
streamflow_fees: string;
|
|
60
|
+
treasury: string;
|
|
61
|
+
tx_fee: string;
|
|
62
|
+
withdrawor: string;
|
|
63
|
+
}
|
|
64
|
+
declare class Contract implements LinearStream {
|
|
65
|
+
magic: number;
|
|
66
|
+
version: number;
|
|
67
|
+
createdAt: number;
|
|
68
|
+
withdrawnAmount: BN;
|
|
69
|
+
canceledAt: number;
|
|
70
|
+
end: number;
|
|
71
|
+
lastWithdrawnAt: number;
|
|
72
|
+
sender: string;
|
|
73
|
+
senderTokens: string;
|
|
74
|
+
recipient: string;
|
|
75
|
+
recipientTokens: string;
|
|
76
|
+
mint: string;
|
|
77
|
+
escrowTokens: string;
|
|
78
|
+
streamflowTreasury: string;
|
|
79
|
+
streamflowTreasuryTokens: string;
|
|
80
|
+
streamflowFeeTotal: BN;
|
|
81
|
+
streamflowFeeWithdrawn: BN;
|
|
82
|
+
streamflowFeePercent: number;
|
|
83
|
+
partnerFeeTotal: BN;
|
|
84
|
+
partnerFeeWithdrawn: BN;
|
|
85
|
+
partnerFeePercent: number;
|
|
86
|
+
partner: string;
|
|
87
|
+
partnerTokens: string;
|
|
88
|
+
start: number;
|
|
89
|
+
depositedAmount: BN;
|
|
90
|
+
period: number;
|
|
91
|
+
amountPerPeriod: BN;
|
|
92
|
+
cliff: number;
|
|
93
|
+
cliffAmount: BN;
|
|
94
|
+
cancelableBySender: boolean;
|
|
95
|
+
cancelableByRecipient: boolean;
|
|
96
|
+
automaticWithdrawal: boolean;
|
|
97
|
+
transferableBySender: boolean;
|
|
98
|
+
transferableByRecipient: boolean;
|
|
99
|
+
canTopup: boolean;
|
|
100
|
+
name: string;
|
|
101
|
+
withdrawalFrequency: number;
|
|
102
|
+
closed: boolean;
|
|
103
|
+
currentPauseStart: number;
|
|
104
|
+
pauseCumulative: BN;
|
|
105
|
+
lastRateChangeTime: number;
|
|
106
|
+
fundsUnlockedAtLastRateChange: BN;
|
|
107
|
+
type: StreamType;
|
|
108
|
+
constructor(stream: StreamResource, tokenId: string);
|
|
109
|
+
unlocked(currentTimestamp: number): BN;
|
|
110
|
+
remaining(decimals: number): number;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare class AptosStreamClient extends BaseStreamClient {
|
|
114
|
+
private programId;
|
|
115
|
+
private maxGas;
|
|
116
|
+
private client;
|
|
117
|
+
constructor(clusterUrl: string, cluster?: ICluster, maxGas?: string, programId?: string);
|
|
118
|
+
/**
|
|
119
|
+
* Creates a new stream/vesting contract.
|
|
120
|
+
*/
|
|
121
|
+
create(streamData: ICreateStreamData, { senderWallet }: ICreateStreamAptosExt): Promise<ICreateResult>;
|
|
122
|
+
/**
|
|
123
|
+
* Creates multiple stream/vesting contracts.
|
|
124
|
+
*/
|
|
125
|
+
createMultiple(multipleStreamData: ICreateMultipleStreamData, { senderWallet }: ICreateStreamAptosExt): Promise<IMultiTransactionResult>;
|
|
126
|
+
/**
|
|
127
|
+
* Attempts withdrawing from the specified stream.
|
|
128
|
+
*/
|
|
129
|
+
withdraw({ id, amount }: IWithdrawData, { senderWallet, tokenId }: ITransactionAptosExt): Promise<ITransactionResult>;
|
|
130
|
+
/**
|
|
131
|
+
* Attempts canceling the specified stream.
|
|
132
|
+
*/
|
|
133
|
+
cancel(cancelData: ICancelData, { senderWallet, tokenId }: ITransactionAptosExt): Promise<ITransactionResult>;
|
|
134
|
+
/**
|
|
135
|
+
* Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract).
|
|
136
|
+
*/
|
|
137
|
+
transfer(transferData: ITransferData, { senderWallet, tokenId }: ITransactionAptosExt): Promise<ITransactionResult>;
|
|
138
|
+
/**
|
|
139
|
+
* Tops up stream account with specified amount.
|
|
140
|
+
*/
|
|
141
|
+
topup(topupData: ITopUpData, { senderWallet, tokenId }: ITransactionAptosExt): Promise<ITransactionResult>;
|
|
142
|
+
/**
|
|
143
|
+
* Fetch stream data by its id (address).
|
|
144
|
+
*/
|
|
145
|
+
getOne({ id }: IGetOneData): Promise<Contract>;
|
|
146
|
+
get(): Promise<[string, Contract][]>;
|
|
147
|
+
/**
|
|
148
|
+
* Attempts updating the stream auto withdrawal params and amount per period
|
|
149
|
+
*/
|
|
150
|
+
update(updateData: IUpdateData, { senderWallet, tokenId }: ITransactionAptosExt): Promise<ITransactionResult>;
|
|
151
|
+
getFees({ address }: IGetFeesData): Promise<IFees | null>;
|
|
152
|
+
getDefaultStreamflowFee(): Promise<number>;
|
|
153
|
+
extractErrorCode(err: Error): string | null;
|
|
154
|
+
/**
|
|
155
|
+
* Returns StreamClient protocol program ID.
|
|
156
|
+
*/
|
|
157
|
+
getProgramId(): string;
|
|
158
|
+
getMaxGas(): {
|
|
159
|
+
max_gas_amount: string;
|
|
160
|
+
};
|
|
161
|
+
private generateMultiPayloads;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
declare function extractAptosErrorCode(errorText: string): string | null;
|
|
165
|
+
/**
|
|
166
|
+
* Aptos has inconsistencies in how it returns addresses.
|
|
167
|
+
* This method normalizes them to be 64+2(0x...) characters long, or leaves it as SPECIAL ADDRESS (0x0 - 0xf inclusive)
|
|
168
|
+
* Per this: https://github.com/aptos-labs/aptos-ts-sdk/blob/main/src/core/accountAddress.ts#L115
|
|
169
|
+
* */
|
|
170
|
+
declare function normalizeAptosAddress(address: string): string;
|
|
171
|
+
|
|
172
|
+
declare const APTOS_PROGRAM_IDS: Record<ICluster, string>;
|
|
173
|
+
declare const APTOS_ERROR_MATCH_REGEX: RegExp;
|
|
174
|
+
declare const APTOS_MODULE_ERROR_MAP: {
|
|
175
|
+
[key: string]: {
|
|
176
|
+
[key: number]: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
declare const constants_APTOS_ERROR_MATCH_REGEX: typeof APTOS_ERROR_MATCH_REGEX;
|
|
181
|
+
declare const constants_APTOS_MODULE_ERROR_MAP: typeof APTOS_MODULE_ERROR_MAP;
|
|
182
|
+
declare const constants_APTOS_PROGRAM_IDS: typeof APTOS_PROGRAM_IDS;
|
|
183
|
+
declare namespace constants {
|
|
184
|
+
export { constants_APTOS_ERROR_MATCH_REGEX as APTOS_ERROR_MATCH_REGEX, constants_APTOS_MODULE_ERROR_MAP as APTOS_MODULE_ERROR_MAP, constants_APTOS_PROGRAM_IDS as APTOS_PROGRAM_IDS };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
type index_AptosStreamClient = AptosStreamClient;
|
|
188
|
+
declare const index_AptosStreamClient: typeof AptosStreamClient;
|
|
189
|
+
type index_ConfigResource = ConfigResource;
|
|
190
|
+
type index_Contract = Contract;
|
|
191
|
+
declare const index_Contract: typeof Contract;
|
|
192
|
+
type index_FeeTableResource = FeeTableResource;
|
|
193
|
+
type index_ICreateStreamAptosExt = ICreateStreamAptosExt;
|
|
194
|
+
type index_ITransactionAptosExt = ITransactionAptosExt;
|
|
195
|
+
type index_StreamResource = StreamResource;
|
|
196
|
+
declare const index_constants: typeof constants;
|
|
197
|
+
declare const index_extractAptosErrorCode: typeof extractAptosErrorCode;
|
|
198
|
+
declare const index_normalizeAptosAddress: typeof normalizeAptosAddress;
|
|
199
|
+
declare namespace index {
|
|
200
|
+
export { index_AptosStreamClient as AptosStreamClient, type index_ConfigResource as ConfigResource, index_Contract as Contract, type index_FeeTableResource as FeeTableResource, type index_ICreateStreamAptosExt as ICreateStreamAptosExt, type index_ITransactionAptosExt as ITransactionAptosExt, type index_StreamResource as StreamResource, index_constants as constants, AptosStreamClient as default, index_extractAptosErrorCode as extractAptosErrorCode, index_normalizeAptosAddress as normalizeAptosAddress };
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export { AptosStreamClient as A, type ConfigResource as C, type FeeTableResource as F, type ICreateStreamAptosExt as I, type StreamResource as S, type ITransactionAptosExt as a, Contract as b, constants as c, extractAptosErrorCode as e, index as i, normalizeAptosAddress as n };
|