From 9ddcd77f3e901b085d0d0661bbadaf426ebfa0d3 Mon Sep 17 00:00:00 2001 From: Yutaro Mori Date: Wed, 11 Nov 2020 05:20:52 +0900 Subject: [PATCH] Fix type definitions for TokenSwap class (#809) --- token-swap/js/module.d.ts | 13 ++++--------- token-swap/js/module.flow.js | 15 +++++---------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/token-swap/js/module.d.ts b/token-swap/js/module.d.ts index ead9c90a..283df3ad 100644 --- a/token-swap/js/module.d.ts +++ b/token-swap/js/module.d.ts @@ -84,11 +84,12 @@ declare module '@solana/spl-token-swap' { authority: PublicKey, tokenAccountA: PublicKey, tokenAccountB: PublicKey, - tokenPool: PublicKey, + poolToken: PublicKey, mintA: PublicKey, mintB: PublicKey, feeAccount: PublicKey, tokenAccountPool: PublicKey, + swapProgramId: PublicKey, tokenProgramId: PublicKey, nonce: number, curveType: number, @@ -100,7 +101,6 @@ declare module '@solana/spl-token-swap' { ownerWithdrawFeeDenominator: number, hostFeeNumerator: number, hostFeeDenominator: number, - swapProgramId: PublicKey, ): Promise; swap( @@ -130,14 +130,9 @@ declare module '@solana/spl-token-swap' { ): TransactionInstruction; deposit( - authority: PublicKey, - sourceA: PublicKey, - sourceB: PublicKey, - intoA: PublicKey, - intoB: PublicKey, - poolToken: PublicKey, + userAccountA: PublicKey, + userAccountB: PublicKey, poolAccount: PublicKey, - tokenProgramId: PublicKey, poolTokenAmount: number | Numberu64, maximumTokenA: number | Numberu64, maximumTokenB: number | Numberu64, diff --git a/token-swap/js/module.flow.js b/token-swap/js/module.flow.js index fd2c486c..7126b64d 100644 --- a/token-swap/js/module.flow.js +++ b/token-swap/js/module.flow.js @@ -46,7 +46,6 @@ declare module '@solana/spl-token-swap' { ): Promise; static createInitSwapInstruction( - programId: PublicKey, tokenSwapAccount: Account, authority: PublicKey, tokenAccountA: PublicKey, @@ -55,6 +54,7 @@ declare module '@solana/spl-token-swap' { feeAccount: PublicKey, tokenAccountPool: PublicKey, tokenProgramId: PublicKey, + swapProgramId: PublicKey, nonce: number, curveType: number, tradeFeeNumerator: number, @@ -81,11 +81,12 @@ declare module '@solana/spl-token-swap' { authority: PublicKey, tokenAccountA: PublicKey, tokenAccountB: PublicKey, - tokenPool: PublicKey, + poolToken: PublicKey, mintA: PublicKey, mintB: PublicKey, feeAccount: PublicKey, tokenAccountPool: PublicKey, + swapProgramId: PublicKey, tokenProgramId: PublicKey, nonce: number, curveType: number, @@ -97,7 +98,6 @@ declare module '@solana/spl-token-swap' { ownerWithdrawFeeDenominator: number, hostFeeNumerator: number, hostFeeDenominator: number, - programId: PublicKey, ): Promise; swap( @@ -127,14 +127,9 @@ declare module '@solana/spl-token-swap' { ): TransactionInstruction; deposit( - authority: PublicKey, - sourceA: PublicKey, - sourceB: PublicKey, - intoA: PublicKey, - intoB: PublicKey, - poolToken: PublicKey, + userAccountA: PublicKey, + userAccountB: PublicKey, poolAccount: PublicKey, - tokenProgramId: PublicKey, poolTokenAmount: number | Numberu64, maximumTokenA: number | Numberu64, maximumTokenB: number | Numberu64,