@hyperionxyz/sdk
Advanced tools
@@ -8,6 +8,5 @@ import { AptosScriptComposer, CallArgument } from '@aptos-labs/script-composer-sdk'; | ||
| * @param stable Whether the swap is stable | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
| */ | ||
| export declare function cellanaSwap(builder: AptosScriptComposer, assetIn: CallArgument, outMetaId: string, stable: boolean, abi: any): Promise<CallArgument>; | ||
| export declare function cellanaSwap(builder: AptosScriptComposer, assetIn: CallArgument, outMetaId: string, stable: boolean): Promise<CallArgument>; | ||
| //# sourceMappingURL=cellana.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"cellana.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/dex/cellana.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAKzC;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,YAAY,CAAC,CAQvB"} | ||
| {"version":3,"file":"cellana.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/dex/cellana.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAKzC;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,YAAY,CAAC,CAOvB"} |
@@ -15,3 +15,3 @@ import { AptosScriptComposer, CallArgument } from '@aptos-labs/script-composer-sdk'; | ||
| */ | ||
| export declare function emojiSwap(builder: AptosScriptComposer, firstType: string, secondType: string, tokenInput: CallArgument, pool: string, isSell: boolean, integrator: string, integratorFee: number, abi: any): Promise<CallArgument>; | ||
| export declare function emojiSwap(builder: AptosScriptComposer, firstType: string, secondType: string, tokenInput: CallArgument, pool: string, isSell: boolean, integrator: string, integratorFee: number): Promise<CallArgument>; | ||
| //# sourceMappingURL=emoji.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/dex/emoji.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAGzC;;;;;;;;;;;;GAYG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,YAAY,EACxB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,YAAY,CAAC,CAevB"} | ||
| {"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/dex/emoji.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAGzC;;;;;;;;;;;;GAYG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,YAAY,EACxB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,YAAY,CAAC,CAcvB"} |
@@ -12,7 +12,6 @@ import { AptosScriptComposer, CallArgument } from '@aptos-labs/script-composer-sdk'; | ||
| * @param sqrtPriceLimit The sqrt price limit | ||
| * @param abi The ABI of the contract | ||
| * @param options The options of the SDK | ||
| * @returns The output token | ||
| */ | ||
| export declare function hyperionSwapFAToFA(builder: AptosScriptComposer, sender: CallArgument, poolId: string, a2b: boolean, byAmountIn: boolean, faIn: CallArgument, sqrtPriceLimit: number | string, abi: any, options: SDKOptions): Promise<CallArgument>; | ||
| export declare function hyperionSwapFAToFA(builder: AptosScriptComposer, sender: CallArgument, poolId: string, a2b: boolean, byAmountIn: boolean, faIn: CallArgument, sqrtPriceLimit: number | string, options: SDKOptions): Promise<CallArgument>; | ||
| //# sourceMappingURL=hyperion.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"hyperion.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/dex/hyperion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,OAAO,EACZ,UAAU,EAAE,OAAO,EACnB,IAAI,EAAE,YAAY,EAClB,cAAc,EAAE,MAAM,GAAG,MAAM,EAC/B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,YAAY,CAAC,CAkBvB"} | ||
| {"version":3,"file":"hyperion.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/dex/hyperion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,OAAO,EACZ,UAAU,EAAE,OAAO,EACnB,IAAI,EAAE,YAAY,EAClB,cAAc,EAAE,MAAM,GAAG,MAAM,EAC/B,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,YAAY,CAAC,CAiBvB"} |
@@ -8,6 +8,5 @@ import { AptosScriptComposer, CallArgument } from '@aptos-labs/script-composer-sdk'; | ||
| * @param outMetaId The output token | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
| */ | ||
| export declare function thalaSwapExactInStable(builder: AptosScriptComposer, poolId: string, assetIn: CallArgument, outMetaId: string, abi: any): Promise<CallArgument>; | ||
| export declare function thalaSwapExactInStable(builder: AptosScriptComposer, poolId: string, assetIn: CallArgument, outMetaId: string): Promise<CallArgument>; | ||
| /** | ||
@@ -19,6 +18,5 @@ * Thala Swap Exact In Meta | ||
| * @param outMetaId The output token | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
| */ | ||
| export declare function thalaSwapExactInMeta(builder: AptosScriptComposer, poolId: string, assetIn: CallArgument, outMetaId: string, abi: any): Promise<CallArgument>; | ||
| export declare function thalaSwapExactInMeta(builder: AptosScriptComposer, poolId: string, assetIn: CallArgument, outMetaId: string): Promise<CallArgument>; | ||
| /** | ||
@@ -31,6 +29,5 @@ * Thala Swap Exact Out Stable | ||
| * @param amountOut The amount out | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
| */ | ||
| export declare function swapExactOutStable(builder: AptosScriptComposer, pool: CallArgument, assetIn: CallArgument, metadataOut: CallArgument, amountOut: number, abi: any): Promise<CallArgument[]>; | ||
| export declare function swapExactOutStable(builder: AptosScriptComposer, pool: CallArgument, assetIn: CallArgument, metadataOut: CallArgument, amountOut: number): Promise<CallArgument[]>; | ||
| /** | ||
@@ -42,6 +39,5 @@ * Thala Swap Exact In Weighted | ||
| * @param outMetaId The output token | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
| */ | ||
| export declare function thalaSwapExactInWeighted(builder: AptosScriptComposer, poolId: string, assetIn: CallArgument, outMetaId: string, abi: any): Promise<CallArgument>; | ||
| export declare function thalaSwapExactInWeighted(builder: AptosScriptComposer, poolId: string, assetIn: CallArgument, outMetaId: string): Promise<CallArgument>; | ||
| /** | ||
@@ -54,6 +50,5 @@ * Thala Swap Exact Out Weighted | ||
| * @param amountOut The amount out | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
| */ | ||
| export declare function swapExactOutWeighted(builder: AptosScriptComposer, pool: CallArgument, assetIn: CallArgument, metadataOut: CallArgument, amountOut: number, abi: any): Promise<CallArgument[]>; | ||
| export declare function swapExactOutWeighted(builder: AptosScriptComposer, pool: CallArgument, assetIn: CallArgument, metadataOut: CallArgument, amountOut: number): Promise<CallArgument[]>; | ||
| //# sourceMappingURL=thalaswapV2.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"thalaswapV2.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/dex/thalaswapV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAMzC;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,GAAG,yBAeT;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,GAAG,yBAeT;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,YAAY,EACrB,WAAW,EAAE,YAAY,EACzB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,GAAG,2BAeT;AAED;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,GAAG,yBAST;AAED;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,YAAY,EACrB,WAAW,EAAE,YAAY,EACzB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,GAAG,2BAeT"} | ||
| {"version":3,"file":"thalaswapV2.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/dex/thalaswapV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAMzC;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,yBAalB;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,yBAalB;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,YAAY,EACrB,WAAW,EAAE,YAAY,EACzB,SAAS,EAAE,MAAM,2BAclB;AAED;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,yBAQlB;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,YAAY,EACrB,WAAW,EAAE,YAAY,EACzB,SAAS,EAAE,MAAM,2BAclB"} |
@@ -27,4 +27,3 @@ import { AptosScriptComposer } from '@aptos-labs/script-composer-sdk'; | ||
| * Generate the aggregate swap transaction script | ||
| * @param args AggregateSwapInfoResult & { abi: any; builder: AptosScriptComposer } | ||
| * @param args.abi The ABI of the contract | ||
| * @param args AggregateSwapInfoResult & { builder: AptosScriptComposer } | ||
| * @param args.builder The builder of the transaction | ||
@@ -31,0 +30,0 @@ * @returns The transaction script |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/helper/aggregateSwap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAc,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAyBjD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ;AAwLD,qBAAa,mBAAmB;IAC9B,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC;gBAEhB,GAAG,EAAE,WAAW;IAI5B;;;;;;;;;OASG;IACU,uBAAuB,CAClC,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,uBAAuB,CAAC;IAgCnC;;;;;;OAMG;IACG,sCAAsC,CAC1C,IAAI,EAAE,uBAAuB,GAAG;QAAE,OAAO,EAAE,mBAAmB,CAAA;KAAE;CAmGnE"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/helper/aggregateSwap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAc,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAuBjD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ;AAwKD,qBAAa,mBAAmB;IAC9B,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC;gBAEhB,GAAG,EAAE,WAAW;IAI5B;;;;;;;;;OASG;IACU,uBAAuB,CAClC,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,uBAAuB,CAAC;IAgCnC;;;;;OAKG;IACG,sCAAsC,CAC1C,IAAI,EAAE,uBAAuB,GAAG;QAAE,OAAO,EAAE,mBAAmB,CAAA;KAAE;CAqFnE"} |
@@ -6,6 +6,5 @@ import { AptosScriptComposer, CallArgument } from '@aptos-labs/script-composer-sdk'; | ||
| * @param assetTypeString The type of the asset | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The zero asset | ||
| */ | ||
| export declare function zeroFA(builder: AptosScriptComposer, assetTypeString: string, abiCache: any): Promise<CallArgument>; | ||
| export declare function zeroFA(builder: AptosScriptComposer, assetTypeString: string): Promise<CallArgument>; | ||
| /** | ||
@@ -16,6 +15,5 @@ * Extract Fungible Asset | ||
| * @param amount The amount to extract | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The extracted asset | ||
| */ | ||
| export declare function extractFA(builder: AptosScriptComposer, assetToSplit: CallArgument, amount: number, abiCache: any): Promise<CallArgument>; | ||
| export declare function extractFA(builder: AptosScriptComposer, assetToSplit: CallArgument, amount: number): Promise<CallArgument>; | ||
| /** | ||
@@ -26,6 +24,5 @@ * Merge Fungible Asset | ||
| * @param assetToMerge The asset to merge | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The merged asset | ||
| */ | ||
| export declare function mergeFA(builder: AptosScriptComposer, asset: CallArgument, assetToMerge: CallArgument, abiCache: any): Promise<void>; | ||
| export declare function mergeFA(builder: AptosScriptComposer, asset: CallArgument, assetToMerge: CallArgument): Promise<void>; | ||
| /** | ||
@@ -36,6 +33,5 @@ * Withdraw Fungible Asset | ||
| * @param amount The amount to withdraw | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The withdrawn asset | ||
| */ | ||
| export declare function withdrawFA(builder: AptosScriptComposer, metadata: CallArgument, amount: number, abiCache: any): Promise<CallArgument>; | ||
| export declare function withdrawFA(builder: AptosScriptComposer, metadata: CallArgument, amount: number): Promise<CallArgument>; | ||
| /** | ||
@@ -46,6 +42,5 @@ * Deposit Fungible Asset | ||
| * @param fa The asset to deposit | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The deposited asset | ||
| */ | ||
| export declare function depositFA(builder: AptosScriptComposer, receiver: CallArgument, fa: CallArgument, abiCache: any): Promise<void>; | ||
| export declare function depositFA(builder: AptosScriptComposer, receiver: CallArgument, fa: CallArgument): Promise<void>; | ||
| /** | ||
@@ -55,6 +50,5 @@ * Amount Fungible Asset | ||
| * @param fa The asset to get the amount | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The amount of the asset | ||
| */ | ||
| export declare function amountFA(builder: AptosScriptComposer, fa: CallArgument, abiCache: any): Promise<CallArgument>; | ||
| export declare function amountFA(builder: AptosScriptComposer, fa: CallArgument): Promise<CallArgument>; | ||
| /** | ||
@@ -65,6 +59,5 @@ * Address to Object | ||
| * @param objectAddress The address of the object | ||
| * @param abi The ABI of the contract | ||
| * @returns The object | ||
| */ | ||
| export declare function addressToObject(builder: AptosScriptComposer, type: string, objectAddress: string, abi: any): Promise<CallArgument>; | ||
| export declare function addressToObject(builder: AptosScriptComposer, type: string, objectAddress: string): Promise<CallArgument>; | ||
| /** | ||
@@ -76,6 +69,5 @@ * Split Fungible Asset Proportionally | ||
| * @param percent The percentage to split | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The split asset | ||
| */ | ||
| export declare function faSplitProportionally(builder: AptosScriptComposer, fa: CallArgument, amountIn: CallArgument, percent: number, abiCache: any): Promise<CallArgument>; | ||
| export declare function faSplitProportionally(builder: AptosScriptComposer, fa: CallArgument, amountIn: CallArgument, percent: number): Promise<CallArgument>; | ||
| /** | ||
@@ -86,6 +78,5 @@ * Amount Check Fungible Asset | ||
| * @param amount The amount to check | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The checked amount | ||
| */ | ||
| export declare function faAmountCheck(builder: AptosScriptComposer, fa: CallArgument, amount: number, abiCache: any): Promise<void>; | ||
| export declare function faAmountCheck(builder: AptosScriptComposer, fa: CallArgument, amount: number): Promise<void>; | ||
| /** | ||
@@ -97,13 +88,11 @@ * Deposit Exact Fungible Asset | ||
| * @param amount The amount to deposit | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The deposited asset | ||
| */ | ||
| export declare function depositExactFA(builder: AptosScriptComposer, receiver: CallArgument, fa: CallArgument, amount: number, abiCache: any): Promise<void>; | ||
| export declare function depositExactFA(builder: AptosScriptComposer, receiver: CallArgument, fa: CallArgument, amount: number): Promise<void>; | ||
| /** | ||
| * Get Sender | ||
| * @param builder The builder of the transaction | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The sender | ||
| */ | ||
| export declare function getSender(builder: AptosScriptComposer, abiCache: any): Promise<CallArgument>; | ||
| export declare function getSender(builder: AptosScriptComposer): Promise<CallArgument>; | ||
| //# sourceMappingURL=utils.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/helper/aggregateSwap/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAGzC;;;;;;GAMG;AACH,wBAAsB,MAAM,CAC1B,OAAO,EAAE,mBAAmB,EAC5B,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,GAAG,GACZ,OAAO,CAAC,YAAY,CAAC,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
| { | ||
| "name": "@hyperionxyz/sdk", | ||
| "version": "0.0.23-alpha.1", | ||
| "version": "0.0.24-beta.0", | ||
| "description": "", | ||
@@ -31,3 +31,2 @@ "type": "module", | ||
| "dependencies": { | ||
| "@aptos-labs/script-composer-sdk": "latest", | ||
| "aptos-tool": "^0.0.11", | ||
@@ -39,3 +38,4 @@ "bignumber.js": "^9.1.2", | ||
| "peerDependencies": { | ||
| "@aptos-labs/ts-sdk": "latest" | ||
| "@aptos-labs/ts-sdk": "latest", | ||
| "@aptos-labs/script-composer-sdk": "0.3.0-beta.2" | ||
| }, | ||
@@ -42,0 +42,0 @@ "publishConfig": { |
+1
-1
@@ -9,3 +9,3 @@ # @hyperionxyz/sdk | ||
| ```bash | ||
| pnpm install @hyperionxyz/sdk | ||
| pnpm install @aptos-labs/ts-sdk @aptos-labs/script-composer-sdk @hyperionxyz/sdk | ||
| ``` | ||
@@ -12,0 +12,0 @@ |
@@ -15,3 +15,2 @@ import { | ||
| * @param stable Whether the swap is stable | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
@@ -23,4 +22,3 @@ */ | ||
| outMetaId: string, | ||
| stable: boolean, | ||
| abi: any | ||
| stable: boolean | ||
| ): Promise<CallArgument> { | ||
@@ -31,5 +29,4 @@ let ret = await builder.addBatchedCalls({ | ||
| functionArguments: [assetIn, 0, outMetaId, stable], | ||
| moduleAbi: abi["cellana"], | ||
| }); | ||
| return ret[0]; | ||
| } |
@@ -28,4 +28,3 @@ import { | ||
| integrator: string, | ||
| integratorFee: number, | ||
| abi: any | ||
| integratorFee: number | ||
| ): Promise<CallArgument> { | ||
@@ -43,5 +42,4 @@ let ret = await builder.addBatchedCalls({ | ||
| ], | ||
| moduleAbi: abi["tool"], | ||
| }); | ||
| return ret[1]; | ||
| } |
@@ -18,3 +18,2 @@ import { | ||
| * @param sqrtPriceLimit The sqrt price limit | ||
| * @param abi The ABI of the contract | ||
| * @param options The options of the SDK | ||
@@ -31,6 +30,5 @@ * @returns The output token | ||
| sqrtPriceLimit: number | string, | ||
| abi: any, | ||
| options: SDKOptions | ||
| ): Promise<CallArgument> { | ||
| let amount = await amountFA(builder, faIn, abi); | ||
| let amount = await amountFA(builder, faIn); | ||
| let ret = await builder.addBatchedCalls({ | ||
@@ -48,6 +46,5 @@ function: `${options.contractAddress}::partnership::swap`, | ||
| ], | ||
| moduleAbi: abi["hyperion"], | ||
| }); | ||
| await depositFA(builder, sender, ret[1], abi); | ||
| await depositFA(builder, sender, ret[1]); | ||
| return ret[2]; | ||
| } |
@@ -16,3 +16,2 @@ import { | ||
| * @param outMetaId The output token | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
@@ -24,4 +23,3 @@ */ | ||
| assetIn: CallArgument, | ||
| outMetaId: string, | ||
| abi: any | ||
| outMetaId: string | ||
| ) { | ||
@@ -31,4 +29,3 @@ let outMeta = await addressToObject( | ||
| `0x1::fungible_asset::Metadata`, | ||
| outMetaId, | ||
| abi | ||
| outMetaId | ||
| ); | ||
@@ -39,3 +36,2 @@ let ret = await builder.addBatchedCalls({ | ||
| functionArguments: [CallArgument.newSigner(0), poolId, assetIn, outMeta], | ||
| moduleAbi: abi["thala"], | ||
| }); | ||
@@ -51,3 +47,2 @@ return ret[0]; | ||
| * @param outMetaId The output token | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
@@ -59,4 +54,3 @@ */ | ||
| assetIn: CallArgument, | ||
| outMetaId: string, | ||
| abi: any | ||
| outMetaId: string | ||
| ) { | ||
@@ -66,4 +60,3 @@ let outMeta = await addressToObject( | ||
| `0x1::fungible_asset::Metadata`, | ||
| outMetaId, | ||
| abi | ||
| outMetaId | ||
| ); | ||
@@ -74,3 +67,2 @@ let ret = await builder.addBatchedCalls({ | ||
| functionArguments: [CallArgument.newSigner(0), poolId, assetIn, outMeta], | ||
| moduleAbi: abi["thala"], | ||
| }); | ||
@@ -87,3 +79,2 @@ return ret[0]; | ||
| * @param amountOut The amount out | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
@@ -96,4 +87,3 @@ */ | ||
| metadataOut: CallArgument, | ||
| amountOut: number, | ||
| abi: any | ||
| amountOut: number | ||
| ) { | ||
@@ -110,3 +100,2 @@ let ret = await builder.addBatchedCalls({ | ||
| ], | ||
| moduleAbi: abi["thala"], | ||
| }); | ||
@@ -122,3 +111,2 @@ return ret; | ||
| * @param outMetaId The output token | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
@@ -130,4 +118,3 @@ */ | ||
| assetIn: CallArgument, | ||
| outMetaId: string, | ||
| abi: any | ||
| outMetaId: string | ||
| ) { | ||
@@ -138,3 +125,2 @@ let ret = await builder.addBatchedCalls({ | ||
| functionArguments: [CallArgument.newSigner(0), poolId, assetIn, outMetaId], | ||
| moduleAbi: abi["thala"], | ||
| }); | ||
@@ -151,3 +137,2 @@ return ret[0]; | ||
| * @param amountOut The amount out | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
@@ -160,4 +145,3 @@ */ | ||
| metadataOut: CallArgument, | ||
| amountOut: number, | ||
| abi: any | ||
| amountOut: number | ||
| ) { | ||
@@ -174,5 +158,4 @@ let ret = await builder.addBatchedCalls({ | ||
| ], | ||
| moduleAbi: abi["thala"], | ||
| }); | ||
| return ret; | ||
| } |
@@ -28,4 +28,2 @@ import { | ||
| import { emojiSwap } from "./dex/emoji"; | ||
| import originalABI from "./abis/originalABI"; | ||
| import stdABI from "./abis/stdABI"; | ||
@@ -46,3 +44,2 @@ export interface AggregateSwapRouteArgs { | ||
| * @param sender The sender of the transaction | ||
| * @param abi The ABI of the contract | ||
| * @param options The options of the SDK | ||
@@ -56,3 +53,2 @@ * @returns The output token | ||
| sender: CallArgument, | ||
| abi: any, | ||
| options: SDKOptions | ||
@@ -69,3 +65,2 @@ ): Promise<CallArgument> { | ||
| route.sqrtPriceLimit, | ||
| abi, | ||
| options | ||
@@ -82,3 +77,2 @@ ); | ||
| * @param assetIn The input token | ||
| * @param abi The ABI of the contract | ||
| * @returns The output token | ||
@@ -89,4 +83,3 @@ */ | ||
| route: any, | ||
| assetIn: CallArgument, | ||
| abi: any | ||
| assetIn: CallArgument | ||
| ): Promise<CallArgument> { | ||
@@ -106,4 +99,3 @@ let isStable; | ||
| route.toToken.tokenType, | ||
| isStable, | ||
| abi | ||
| isStable | ||
| ); | ||
@@ -116,4 +108,3 @@ return ret; | ||
| route: any, | ||
| tokenIn: CallArgument, | ||
| abi: any | ||
| tokenIn: CallArgument | ||
| ): Promise<CallArgument> { | ||
@@ -127,4 +118,3 @@ let tokenOut: CallArgument; | ||
| tokenIn, | ||
| route.toToken.tokenType, | ||
| abi | ||
| route.toToken.tokenType | ||
| ); | ||
@@ -136,4 +126,3 @@ } else if (route.poolType == "weighted") { | ||
| tokenIn, | ||
| route.toToken.tokenType, | ||
| abi | ||
| route.toToken.tokenType | ||
| ); | ||
@@ -145,4 +134,3 @@ } else if (route.poolType == "meta") { | ||
| tokenIn, | ||
| route.toToken.tokenType, | ||
| abi | ||
| route.toToken.tokenType | ||
| ); | ||
@@ -158,4 +146,3 @@ } else { | ||
| route: any, | ||
| tokenIn: CallArgument, | ||
| abi: any | ||
| tokenIn: CallArgument | ||
| ): Promise<CallArgument> { | ||
@@ -170,4 +157,3 @@ let tokenOut = await emojiSwap( | ||
| route.integrator, | ||
| route.integratorFee, | ||
| abi | ||
| route.integratorFee | ||
| ); | ||
@@ -183,3 +169,2 @@ | ||
| sender: CallArgument, | ||
| abi: any, | ||
| options: SDKOptions | ||
@@ -194,11 +179,10 @@ ): Promise<CallArgument> { | ||
| sender.copy(), | ||
| abi, | ||
| options | ||
| ); | ||
| } else if (route.dexName == "Cellana") { | ||
| ret = await composeWithCellana(builder, route, tokenIn, abi); | ||
| ret = await composeWithCellana(builder, route, tokenIn); | ||
| } else if (route.dexName == "ThalaSwapV2") { | ||
| ret = await composeWithThalaSwapV2(builder, route, tokenIn, abi); | ||
| ret = await composeWithThalaSwapV2(builder, route, tokenIn); | ||
| } else if (route.dexName == "EmojiCoin") { | ||
| ret = await composeWithEmojiCoin(builder, route, tokenIn, abi); | ||
| ret = await composeWithEmojiCoin(builder, route, tokenIn); | ||
| } else { | ||
@@ -215,3 +199,2 @@ throw "Dex Not Supported"; | ||
| sender: CallArgument, | ||
| abi: any, | ||
| options: SDKOptions | ||
@@ -222,3 +205,3 @@ ): Promise<CallArgument> { | ||
| let tokenOut: CallArgument; | ||
| tokenOut = await zeroFA(builder, singlePair.toToken.tokenType, abi); | ||
| tokenOut = await zeroFA(builder, singlePair.toToken.tokenType); | ||
| let ret = await compose( | ||
@@ -229,6 +212,5 @@ builder, | ||
| sender.copy(), | ||
| abi, | ||
| options | ||
| ); | ||
| await mergeFA(builder, tokenOut, ret, abi); | ||
| await mergeFA(builder, tokenOut, ret); | ||
| tokenIn = tokenOut; | ||
@@ -292,4 +274,3 @@ } | ||
| * Generate the aggregate swap transaction script | ||
| * @param args AggregateSwapInfoResult & { abi: any; builder: AptosScriptComposer } | ||
| * @param args.abi The ABI of the contract | ||
| * @param args AggregateSwapInfoResult & { builder: AptosScriptComposer } | ||
| * @param args.builder The builder of the transaction | ||
@@ -302,7 +283,3 @@ * @returns The transaction script | ||
| const { builder } = args; | ||
| const abi = { | ||
| ...stdABI, | ||
| ...originalABI, | ||
| }; | ||
| let sender = await getSender(builder, abi); | ||
| let sender = await getSender(builder); | ||
| let amountIn: number; | ||
@@ -321,13 +298,12 @@ if (args.exactIn) { | ||
| "0x1::fungible_asset::Metadata", | ||
| args.fromToken.address, | ||
| abi | ||
| args.fromToken.address | ||
| ); | ||
| tokenIn = await withdrawFA(builder, metadata, amountIn, abi); | ||
| amountInArg = await amountFA(builder, tokenIn, abi); | ||
| tokenIn = await withdrawFA(builder, metadata, amountIn); | ||
| amountInArg = await amountFA(builder, tokenIn); | ||
| const tokenOut = await zeroFA(builder, args.toToken.address, abi); | ||
| const tokenOut = await zeroFA(builder, args.toToken.address); | ||
| for (const route of args.quotes.route as any[]) { | ||
| let routeTokenIn: CallArgument; | ||
| routeTokenIn = await extractFA(builder, tokenIn, route.amountIn, abi); | ||
| routeTokenIn = await extractFA(builder, tokenIn, route.amountIn); | ||
@@ -339,7 +315,6 @@ let ret = await bigRouteCompose( | ||
| sender.copy(), | ||
| abi, | ||
| this._sdk.sdkOptions | ||
| ); | ||
| // merge token together | ||
| await mergeFA(builder, tokenOut, ret, abi); | ||
| await mergeFA(builder, tokenOut, ret); | ||
| // console.log("aaaaa"); | ||
@@ -349,14 +324,9 @@ } | ||
| if (args.exactIn) { | ||
| await faAmountCheck( | ||
| builder, | ||
| tokenOut, | ||
| Number(args.minToTokenAmount), | ||
| abi | ||
| ); | ||
| await depositFA(builder, sender.copy(), tokenOut, abi); | ||
| await faAmountCheck(builder, tokenOut, Number(args.minToTokenAmount)); | ||
| await depositFA(builder, sender.copy(), tokenOut); | ||
| await depositFA(builder, sender.copy(), tokenIn, abi); | ||
| await depositFA(builder, sender.copy(), tokenIn); | ||
| } else { | ||
| let percentage = 0; | ||
| await faAmountCheck(builder, tokenOut, Number(args.toTokenAmount), abi); | ||
| await faAmountCheck(builder, tokenOut, Number(args.toTokenAmount)); | ||
| await depositExactFA( | ||
@@ -366,9 +336,8 @@ builder, | ||
| tokenOut, | ||
| Number(args.toTokenAmount), | ||
| abi | ||
| Number(args.toTokenAmount) | ||
| ); | ||
| let tokenInRefund: CallArgument; | ||
| tokenInRefund = await zeroFA(builder, args.fromToken.address, abi); | ||
| amountInArg = await amountFA(builder, tokenOut, abi); | ||
| tokenInRefund = await zeroFA(builder, args.fromToken.address); | ||
| amountInArg = await amountFA(builder, tokenOut); | ||
| for (const route of args.quotes.refundRoute as any[]) { | ||
@@ -383,4 +352,3 @@ let routeTokenIn: CallArgument; | ||
| amountInArg.copy(), | ||
| percentageIn, | ||
| abi | ||
| percentageIn | ||
| ); | ||
@@ -393,10 +361,9 @@ | ||
| sender.copy(), | ||
| abi, | ||
| this._sdk.sdkOptions | ||
| ); | ||
| await mergeFA(builder, tokenInRefund, ret, abi); | ||
| await mergeFA(builder, tokenInRefund, ret); | ||
| } | ||
| await depositFA(builder, sender.copy(), tokenOut, abi); | ||
| await depositFA(builder, sender.copy(), tokenIn, abi); | ||
| await depositFA(builder, sender.copy(), tokenInRefund, abi); | ||
| await depositFA(builder, sender.copy(), tokenOut); | ||
| await depositFA(builder, sender.copy(), tokenIn); | ||
| await depositFA(builder, sender.copy(), tokenInRefund); | ||
| if (percentage != 100) throw "not 100% refund"; | ||
@@ -403,0 +370,0 @@ } |
@@ -11,3 +11,2 @@ import { | ||
| * @param assetTypeString The type of the asset | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The zero asset | ||
@@ -17,4 +16,3 @@ */ | ||
| builder: AptosScriptComposer, | ||
| assetTypeString: string, | ||
| abiCache: any | ||
| assetTypeString: string | ||
| ): Promise<CallArgument> { | ||
@@ -24,4 +22,3 @@ let assetMeta = await addressToObject( | ||
| "0x1::fungible_asset::Metadata", | ||
| assetTypeString, | ||
| abiCache | ||
| assetTypeString | ||
| ); | ||
@@ -32,3 +29,2 @@ let asset = await builder.addBatchedCalls({ | ||
| functionArguments: [assetMeta], | ||
| moduleAbi: abiCache["fungibleAsset"], | ||
| }); | ||
@@ -43,3 +39,2 @@ return asset[0]; | ||
| * @param amount The amount to extract | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The extracted asset | ||
@@ -50,4 +45,3 @@ */ | ||
| assetToSplit: CallArgument, | ||
| amount: number, | ||
| abiCache: any | ||
| amount: number | ||
| ): Promise<CallArgument> { | ||
@@ -58,3 +52,2 @@ let asset = await builder.addBatchedCalls({ | ||
| functionArguments: [assetToSplit.borrowMut(), amount], | ||
| moduleAbi: abiCache["fungibleAsset"], | ||
| }); | ||
@@ -69,3 +62,2 @@ return asset[0]; | ||
| * @param assetToMerge The asset to merge | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The merged asset | ||
@@ -76,4 +68,3 @@ */ | ||
| asset: CallArgument, | ||
| assetToMerge: CallArgument, | ||
| abiCache: any | ||
| assetToMerge: CallArgument | ||
| ) { | ||
@@ -84,3 +75,2 @@ await builder.addBatchedCalls({ | ||
| functionArguments: [asset.borrowMut(), assetToMerge], | ||
| moduleAbi: abiCache["fungibleAsset"], | ||
| }); | ||
@@ -94,3 +84,2 @@ } | ||
| * @param amount The amount to withdraw | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The withdrawn asset | ||
@@ -101,6 +90,4 @@ */ | ||
| metadata: CallArgument, | ||
| amount: number, | ||
| abiCache: any | ||
| amount: number | ||
| ): Promise<CallArgument> { | ||
| // debugger; | ||
| let asset = await builder.addBatchedCalls({ | ||
@@ -110,3 +97,2 @@ function: "0x1::primary_fungible_store::withdraw", | ||
| functionArguments: [CallArgument.newSigner(0), metadata, amount], | ||
| moduleAbi: abiCache["primaryFungibleStore"], | ||
| }); | ||
@@ -121,3 +107,2 @@ return asset[0]; | ||
| * @param fa The asset to deposit | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The deposited asset | ||
@@ -128,4 +113,3 @@ */ | ||
| receiver: CallArgument, | ||
| fa: CallArgument, | ||
| abiCache: any | ||
| fa: CallArgument | ||
| ) { | ||
@@ -136,3 +120,2 @@ await builder.addBatchedCalls({ | ||
| functionArguments: [receiver, fa], | ||
| moduleAbi: abiCache["primaryFungibleStore"], | ||
| }); | ||
@@ -145,3 +128,2 @@ } | ||
| * @param fa The asset to get the amount | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The amount of the asset | ||
@@ -151,4 +133,3 @@ */ | ||
| builder: AptosScriptComposer, | ||
| fa: CallArgument, | ||
| abiCache: any | ||
| fa: CallArgument | ||
| ): Promise<CallArgument> { | ||
@@ -159,3 +140,2 @@ let ret = await builder.addBatchedCalls({ | ||
| functionArguments: [fa.borrow()], | ||
| moduleAbi: abiCache["fungbileAsset"], | ||
| }); | ||
@@ -170,3 +150,2 @@ return ret[0]; | ||
| * @param objectAddress The address of the object | ||
| * @param abi The ABI of the contract | ||
| * @returns The object | ||
@@ -177,4 +156,3 @@ */ | ||
| type: string, | ||
| objectAddress: string, | ||
| abi: any | ||
| objectAddress: string | ||
| ): Promise<CallArgument> { | ||
@@ -185,3 +163,2 @@ const obj = await builder.addBatchedCalls({ | ||
| functionArguments: [objectAddress], | ||
| moduleAbi: abi["object"], | ||
| }); | ||
@@ -197,3 +174,2 @@ return obj[0]; | ||
| * @param percent The percentage to split | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The split asset | ||
@@ -205,4 +181,3 @@ */ | ||
| amountIn: CallArgument, | ||
| percent: number, | ||
| abiCache: any | ||
| percent: number | ||
| ): Promise<CallArgument> { | ||
@@ -213,3 +188,2 @@ const faSplitted = await builder.addBatchedCalls({ | ||
| functionArguments: [fa.borrowMut(), amountIn, percent * 100], | ||
| moduleAbi: abiCache["tool"], | ||
| }); | ||
@@ -224,3 +198,2 @@ return faSplitted[0]; | ||
| * @param amount The amount to check | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The checked amount | ||
@@ -231,4 +204,3 @@ */ | ||
| fa: CallArgument, | ||
| amount: number, | ||
| abiCache: any | ||
| amount: number | ||
| ) { | ||
@@ -239,3 +211,2 @@ await builder.addBatchedCalls({ | ||
| functionArguments: [fa.borrow(), amount], | ||
| moduleAbi: abiCache["tool"], | ||
| }); | ||
@@ -250,3 +221,2 @@ } | ||
| * @param amount The amount to deposit | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The deposited asset | ||
@@ -258,4 +228,3 @@ */ | ||
| fa: CallArgument, | ||
| amount: number, | ||
| abiCache: any | ||
| amount: number | ||
| ) { | ||
@@ -266,3 +235,2 @@ await builder.addBatchedCalls({ | ||
| functionArguments: [receiver, fa.borrowMut(), amount], | ||
| moduleAbi: abiCache["tool"], | ||
| }); | ||
@@ -274,10 +242,7 @@ } | ||
| * @param builder The builder of the transaction | ||
| * @param abiCache The ABI of the contract | ||
| * @returns The sender | ||
| */ | ||
| export async function getSender( | ||
| builder: AptosScriptComposer, | ||
| abiCache: any | ||
| builder: AptosScriptComposer | ||
| ): Promise<CallArgument> { | ||
| console.log(CallArgument.newSigner(0), "-----"); | ||
| let sender = await builder.addBatchedCalls({ | ||
@@ -287,5 +252,5 @@ function: `${AGGREGATE_TOOL_CONTRACT_ADDRESS}::tool::get_signer_address`, | ||
| functionArguments: [CallArgument.newSigner(0)], | ||
| moduleAbi: abiCache["tool"], | ||
| }); | ||
| return sender[0]; | ||
| } |
@@ -10,6 +10,4 @@ import { Token, TokenPairs } from "aptos-tool"; | ||
| import { AggregateSwapInfoResult } from "../helper/aggregateSwap/type"; | ||
| import { | ||
| AptosScriptComposer, | ||
| CallArgument, | ||
| } from "@aptos-labs/script-composer-sdk"; | ||
| import { AptosScriptComposer } from "@aptos-labs/script-composer-sdk"; | ||
| import { Network } from "@aptos-labs/ts-sdk"; | ||
@@ -254,2 +252,6 @@ export interface SwapTransactionPayloadArgs { | ||
| ): Promise<AggregateSwapInfoResult> { | ||
| if (this._sdk.sdkOptions.network !== Network.MAINNET) { | ||
| throw new Error("Aggregate swap is only supported on MAINNET"); | ||
| } | ||
| return await this._aggregateSwapHelper.fetchAggregateSwapRoute(args); | ||
@@ -271,3 +273,6 @@ } | ||
| ) { | ||
| console.log(CallArgument.newSigner(0), "-----|||||||----"); | ||
| if (this._sdk.sdkOptions.network !== Network.MAINNET) { | ||
| throw new Error("Aggregate swap is only supported on MAINNET"); | ||
| } | ||
| return await this._aggregateSwapHelper.generateAggregateSwapTransactionScript( | ||
@@ -274,0 +279,0 @@ args |
| declare const _default: { | ||
| hyperion: { | ||
| address: string; | ||
| name: string; | ||
| friends: never[]; | ||
| exposed_functions: { | ||
| name: string; | ||
| visibility: string; | ||
| is_entry: boolean; | ||
| is_view: boolean; | ||
| generic_type_params: never[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| coin: { | ||
| address: string; | ||
| name: string; | ||
| friends: never[]; | ||
| exposed_functions: { | ||
| name: string; | ||
| visibility: string; | ||
| is_entry: boolean; | ||
| is_view: boolean; | ||
| generic_type_params: { | ||
| constraints: never[]; | ||
| }[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| fungibleAsset: { | ||
| address: string; | ||
| name: string; | ||
| friends: never[]; | ||
| exposed_functions: { | ||
| name: string; | ||
| visibility: string; | ||
| is_entry: boolean; | ||
| is_view: boolean; | ||
| generic_type_params: { | ||
| constraints: string[]; | ||
| }[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| tool: { | ||
| address: string; | ||
| name: string; | ||
| friends: never[]; | ||
| exposed_functions: { | ||
| name: string; | ||
| visibility: string; | ||
| is_entry: boolean; | ||
| is_view: boolean; | ||
| generic_type_params: { | ||
| constraints: never[]; | ||
| }[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| cellana: { | ||
| address: string; | ||
| name: string; | ||
| friends: never[]; | ||
| exposed_functions: { | ||
| name: string; | ||
| visibility: string; | ||
| is_entry: boolean; | ||
| is_view: boolean; | ||
| generic_type_params: never[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| thala: { | ||
| address: string; | ||
| name: string; | ||
| friends: never[]; | ||
| exposed_functions: { | ||
| name: string; | ||
| visibility: string; | ||
| is_entry: boolean; | ||
| is_view: boolean; | ||
| generic_type_params: never[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| primaryFungibleStore: { | ||
| address: string; | ||
| name: string; | ||
| friends: never[]; | ||
| exposed_functions: { | ||
| name: string; | ||
| visibility: string; | ||
| is_entry: boolean; | ||
| is_view: boolean; | ||
| generic_type_params: { | ||
| constraints: string[]; | ||
| }[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| object: { | ||
| address: string; | ||
| name: string; | ||
| friends: never[]; | ||
| exposed_functions: { | ||
| name: string; | ||
| visibility: string; | ||
| is_entry: boolean; | ||
| is_view: boolean; | ||
| generic_type_params: { | ||
| constraints: string[]; | ||
| }[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| }; | ||
| export default _default; | ||
| //# sourceMappingURL=originalABI.d.ts.map |
| {"version":3,"file":"originalABI.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/abis/originalABI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAqdE"} |
| declare const _default: { | ||
| coin: { | ||
| address: string; | ||
| name: string; | ||
| exposed_functions: { | ||
| name: string; | ||
| generic_type_params: {}[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| fungibleAsset: { | ||
| address: string; | ||
| name: string; | ||
| exposed_functions: ({ | ||
| name: string; | ||
| params: string[]; | ||
| return: string[]; | ||
| generic_type_params?: undefined; | ||
| } | { | ||
| name: string; | ||
| generic_type_params: { | ||
| constraints: string[]; | ||
| }[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| })[]; | ||
| structs: never[]; | ||
| }; | ||
| primaryFungibleStore: { | ||
| address: string; | ||
| name: string; | ||
| exposed_functions: ({ | ||
| name: string; | ||
| params: string[]; | ||
| return: never[]; | ||
| generic_type_params?: undefined; | ||
| } | { | ||
| name: string; | ||
| generic_type_params: { | ||
| constraints: string[]; | ||
| }[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| })[]; | ||
| structs: never[]; | ||
| }; | ||
| object: { | ||
| address: string; | ||
| name: string; | ||
| exposed_functions: { | ||
| name: string; | ||
| generic_type_params: { | ||
| constraints: string[]; | ||
| }[]; | ||
| params: string[]; | ||
| return: string[]; | ||
| }[]; | ||
| structs: never[]; | ||
| }; | ||
| metadata: { | ||
| address: string; | ||
| name: string; | ||
| exposed_functions: never[]; | ||
| structs: never[]; | ||
| }; | ||
| }; | ||
| export default _default; | ||
| //# sourceMappingURL=stdABI.d.ts.map |
| {"version":3,"file":"stdABI.d.ts","sourceRoot":"","sources":["../../../../../../src/helper/aggregateSwap/abis/stdABI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA2HE"} |
| export default { | ||
| hyperion: { | ||
| address: | ||
| "0x8b4a2c4bb53857c718a04c020b98f8c2e1f99a68b0f57389a8bf5434cd22e05c", | ||
| name: "partnership", | ||
| friends: [], | ||
| exposed_functions: [ | ||
| { | ||
| name: "swap", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: [ | ||
| "0x1::object::Object<0x8b4a2c4bb53857c718a04c020b98f8c2e1f99a68b0f57389a8bf5434cd22e05c::pool_v3::LiquidityPoolV3>", | ||
| "bool", | ||
| "bool", | ||
| "u64", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "u128", | ||
| "0x1::string::String", | ||
| ], | ||
| return: [ | ||
| "u64", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| ], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| coin: { | ||
| address: "0x1", | ||
| name: "coin", | ||
| friends: [], | ||
| exposed_functions: [ | ||
| { | ||
| name: "extract", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["&mut 0x1::coin::Coin<T0>", "u64"], | ||
| return: ["0x1::coin::Coin<T0>"], | ||
| }, | ||
| { | ||
| name: "value", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["&0x1::coin::Coin<T0>"], | ||
| return: ["u64"], | ||
| }, | ||
| { | ||
| name: "merge", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["&mut 0x1::coin::Coin<T0>", "0x1::coin::Coin<T0>"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "balance", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: true, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["address"], | ||
| return: ["u64"], | ||
| }, | ||
| { | ||
| name: "deposit", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["address", "0x1::coin::Coin<T0>"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "destroy_zero", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["0x1::coin::Coin<T0>"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "withdraw", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["&signer", "u64"], | ||
| return: ["0x1::coin::Coin<T0>"], | ||
| }, | ||
| { | ||
| name: "zero", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: [], | ||
| return: ["0x1::coin::Coin<T0>"], | ||
| }, | ||
| { | ||
| name: "coin_to_fungible_asset", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["0x1::coin::Coin<T0>"], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| fungibleAsset: { | ||
| address: "0x1", | ||
| name: "fungible_asset", | ||
| friends: [], | ||
| exposed_functions: [ | ||
| { | ||
| name: "extract", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: ["&mut 0x1::fungible_asset::FungibleAsset", "u64"], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| { | ||
| name: "merge", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: [ | ||
| "&mut 0x1::fungible_asset::FungibleAsset", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| ], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "amount", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: ["&0x1::fungible_asset::FungibleAsset"], | ||
| return: ["u64"], | ||
| }, | ||
| { | ||
| name: "destroy_zero", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: ["0x1::fungible_asset::FungibleAsset"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "zero", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: ["key"], | ||
| }, | ||
| ], | ||
| params: ["0x1::object::Object<T0>"], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| tool: { | ||
| address: | ||
| "0xc3290d98d622b9ab354277e0b1c5e66552f9784d2d4fb473ff321b9338485117", | ||
| name: "tool", | ||
| friends: [], | ||
| exposed_functions: [ | ||
| { | ||
| name: "abort_log", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: [], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "coin_amount_check", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["&0x1::coin::Coin<T0>", "u64"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "deposit_coin_exact", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["address", "&mut 0x1::coin::Coin<T0>", "u64"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "deposit_fa_exact", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: ["address", "&mut 0x1::fungible_asset::FungibleAsset", "u64"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "fa_amount_check", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: ["&0x1::fungible_asset::FungibleAsset", "u64"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "get_signer_address", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: ["&signer"], | ||
| return: ["address"], | ||
| }, | ||
| { | ||
| name: "split_coin_proportionlly", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: [], | ||
| }, | ||
| ], | ||
| params: ["&mut 0x1::coin::Coin<T0>", "u64", "u64"], | ||
| return: ["0x1::coin::Coin<T0>"], | ||
| }, | ||
| { | ||
| name: "split_fa_proportionlly", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: ["&mut 0x1::fungible_asset::FungibleAsset", "u64", "u64"], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| cellana: { | ||
| address: | ||
| "0x4bf51972879e3b95c4781a5cdcb9e1ee24ef483e7d22f2d903626f126df62bd1", | ||
| name: "router", | ||
| friends: [], | ||
| exposed_functions: [ | ||
| { | ||
| name: "swap", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: [ | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "u64", | ||
| "0x1::object::Object<0x1::fungible_asset::Metadata>", | ||
| "bool", | ||
| ], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| thala: { | ||
| address: "0x7730cd28ee1cdc9e999336cbc430f99e7c44397c0aa77516f6f23a78559bb5", | ||
| name: "pool", | ||
| friends: [], | ||
| exposed_functions: [ | ||
| { | ||
| name: "swap_exact_in_metastable", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: [ | ||
| "&signer", | ||
| "0x1::object::Object<0x7730cd28ee1cdc9e999336cbc430f99e7c44397c0aa77516f6f23a78559bb5::pool::Pool>", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "0x1::object::Object<0x1::fungible_asset::Metadata>", | ||
| ], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| { | ||
| name: "swap_exact_in_stable", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: [ | ||
| "&signer", | ||
| "0x1::object::Object<0x7730cd28ee1cdc9e999336cbc430f99e7c44397c0aa77516f6f23a78559bb5::pool::Pool>", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "0x1::object::Object<0x1::fungible_asset::Metadata>", | ||
| ], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| { | ||
| name: "swap_exact_in_weighted", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: [ | ||
| "&signer", | ||
| "0x1::object::Object<0x7730cd28ee1cdc9e999336cbc430f99e7c44397c0aa77516f6f23a78559bb5::pool::Pool>", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "0x1::object::Object<0x1::fungible_asset::Metadata>", | ||
| ], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| { | ||
| name: "swap_exact_out_stable", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: [ | ||
| "&signer", | ||
| "0x1::object::Object<0x7730cd28ee1cdc9e999336cbc430f99e7c44397c0aa77516f6f23a78559bb5::pool::Pool>", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "0x1::object::Object<0x1::fungible_asset::Metadata>", | ||
| "u64", | ||
| ], | ||
| return: [ | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| ], | ||
| }, | ||
| { | ||
| name: "swap_exact_out_weighted", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: [ | ||
| "&signer", | ||
| "0x1::object::Object<0x7730cd28ee1cdc9e999336cbc430f99e7c44397c0aa77516f6f23a78559bb5::pool::Pool>", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "0x1::object::Object<0x1::fungible_asset::Metadata>", | ||
| "u64", | ||
| ], | ||
| return: [ | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| ], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| primaryFungibleStore: { | ||
| address: "0x1", | ||
| name: "primary_fungible_store", | ||
| friends: [], | ||
| exposed_functions: [ | ||
| { | ||
| name: "deposit", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [], | ||
| params: ["address", "0x1::fungible_asset::FungibleAsset"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "withdraw", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: ["key"], | ||
| }, | ||
| ], | ||
| params: ["&signer", "0x1::object::Object<T0>", "u64"], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| object: { | ||
| address: "0x1", | ||
| name: "object", | ||
| friends: [], | ||
| exposed_functions: [ | ||
| { | ||
| name: "address_to_object", | ||
| visibility: "public", | ||
| is_entry: false, | ||
| is_view: false, | ||
| generic_type_params: [ | ||
| { | ||
| constraints: ["key"], | ||
| }, | ||
| ], | ||
| params: ["address"], | ||
| return: ["0x1::object::Object<T0>"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| }; |
| export default { | ||
| coin: { | ||
| address: "0x1", | ||
| name: "coin", | ||
| exposed_functions: [ | ||
| { | ||
| name: "extract", | ||
| generic_type_params: [{}], | ||
| params: ["&mut 0x1::coin::Coin<T0>", "u64"], | ||
| return: ["0x1::coin::Coin<T0>"], | ||
| }, | ||
| { | ||
| name: "value", | ||
| generic_type_params: [{}], | ||
| params: ["&0x1::coin::Coin<T0>"], | ||
| return: ["u64"], | ||
| }, | ||
| { | ||
| name: "merge", | ||
| generic_type_params: [{}], | ||
| params: ["&mut 0x1::coin::Coin<T0>", "0x1::coin::Coin<T0>"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "withdraw", | ||
| generic_type_params: [{}], | ||
| params: ["&signer", "u64"], | ||
| return: ["0x1::coin::Coin<T0>"], | ||
| }, | ||
| { | ||
| name: "deposit", | ||
| generic_type_params: [{}], | ||
| params: ["address", "0x1::coin::Coin<T0>"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "zero", | ||
| generic_type_params: [{}], | ||
| params: [], | ||
| return: ["0x1::coin::Coin<T0>"], | ||
| }, | ||
| { | ||
| name: "coin_to_fungible_asset", | ||
| generic_type_params: [{}], | ||
| params: ["0x1::coin::Coin<T0>"], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| fungibleAsset: { | ||
| address: "0x1", | ||
| name: "fungible_asset", | ||
| exposed_functions: [ | ||
| { | ||
| name: "extract", | ||
| params: ["&mut 0x1::fungible_asset::FungibleAsset", "u64"], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| { | ||
| name: "merge", | ||
| params: [ | ||
| "&mut 0x1::fungible_asset::FungibleAsset", | ||
| "0x1::fungible_asset::FungibleAsset", | ||
| ], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "amount", | ||
| params: ["&0x1::fungible_asset::FungibleAsset"], | ||
| return: ["u64"], | ||
| }, | ||
| { | ||
| name: "destroy_zero", | ||
| params: ["0x1::fungible_asset::FungibleAsset"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "zero", | ||
| generic_type_params: [{ constraints: ["key"] }], | ||
| params: ["0x1::object::Object<T0>"], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| primaryFungibleStore: { | ||
| address: "0x1", | ||
| name: "primary_fungible_store", | ||
| exposed_functions: [ | ||
| { | ||
| name: "deposit", | ||
| params: ["address", "0x1::fungible_asset::FungibleAsset"], | ||
| return: [], | ||
| }, | ||
| { | ||
| name: "withdraw", | ||
| generic_type_params: [{ constraints: ["key"] }], | ||
| params: ["&signer", "0x1::object::Object<T0>", "u64"], | ||
| return: ["0x1::fungible_asset::FungibleAsset"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| object: { | ||
| address: "0x1", | ||
| name: "object", | ||
| exposed_functions: [ | ||
| { | ||
| name: "address_to_object", | ||
| generic_type_params: [{ constraints: ["key"] }], | ||
| params: ["address"], | ||
| return: ["0x1::object::Object<T0>"], | ||
| }, | ||
| ], | ||
| structs: [], | ||
| }, | ||
| metadata: { | ||
| address: "0x1", | ||
| name: "fungible_asset::Metadata", | ||
| exposed_functions: [], | ||
| structs: [], | ||
| }, | ||
| }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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.
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
175510
-94.64%67
-8.22%4239
-85.84%3
50%4
300%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed