File tree Expand file tree Collapse file tree 5 files changed +3157
-8906
lines changed
packages/sdk-ts/src/core/modules Expand file tree Collapse file tree 5 files changed +3157
-8906
lines changed Original file line number Diff line number Diff line change 11import * as CosmosBankV1Beta1TxPb from '@injectivelabs/core-proto-ts-v2/generated/cosmos/bank/v1beta1/tx_pb'
22import * as CosmosBaseV1Beta1CoinPb from '@injectivelabs/core-proto-ts-v2/generated/cosmos/base/v1beta1/coin_pb'
33import { MsgBase } from '../../MsgBase.js'
4+ import type { Coin } from '@injectivelabs/ts-types'
45
56export declare namespace MsgSend {
67 export interface Params {
7- amount :
8- | {
9- denom : string
10- amount : string
11- }
12- | {
13- denom : string
14- amount : string
8+ amount : Coin | Coin [ ]
9+ srcInjectiveAddress : string
10+ dstInjectiveAddress : string
11+ }
12+
13+ export type Proto = CosmosBankV1Beta1TxPb . MsgSend
14+ }
15+
16+ /**
17+ * @category Messages
1518 }[]
1619 srcInjectiveAddress: string
1720 dstInjectiveAddress: string
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import type { TypedDataField } from '../../../tx/eip712/types.js'
66
77export declare namespace MsgFundCommunityPool {
88 export interface Params {
9- amount : Coin [ ]
9+ amount : Coin | Coin [ ]
1010 depositor : string
1111 }
1212
@@ -27,7 +27,11 @@ export default class MsgFundCommunityPool extends MsgBase<
2727 public toProto ( ) {
2828 const { params } = this
2929
30- const coins = params . amount . map ( ( amount ) => {
30+ const amounts = Array . isArray ( params . amount )
31+ ? params . amount
32+ : [ params . amount ]
33+
34+ const coins = amounts . map ( ( amount ) => {
3135 return CosmosBaseV1Beta1CoinPb . Coin . create ( {
3236 denom : amount . denom ,
3337 amount : amount . amount ,
Original file line number Diff line number Diff line change @@ -4,20 +4,13 @@ import * as CosmosBaseV1Beta1CoinPb from '@injectivelabs/core-proto-ts-v2/genera
44import { MsgBase } from '../../MsgBase.js'
55import { fromUtf8 } from '../../../../utils/encoding.js'
66import { safeBigIntStringify } from '../../../../utils/helpers.js'
7+ import type { Coin } from '@injectivelabs/ts-types'
78import type { ExecArgs } from '../exec-args.js'
89
910export declare namespace MsgExecuteContract {
1011 export interface Params {
1112 /* Keep in mind that funds have to be lexicographically sorted by denom */
12- funds ?:
13- | {
14- denom : string
15- amount : string
16- }
17- | {
18- denom : string
19- amount : string
20- } [ ]
13+ funds ?: Coin | Coin [ ]
2114 sender : string
2215 contractAddress : string
2316 /* Used to provide type safety for execution messages */
Original file line number Diff line number Diff line change @@ -2,20 +2,13 @@ import { GeneralException } from '@injectivelabs/exceptions'
22import * as InjectiveWasmxV1TxPb from '@injectivelabs/core-proto-ts-v2/generated/injective/wasmx/v1/tx_pb'
33import { MsgBase } from '../../MsgBase.js'
44import { safeBigIntStringify } from '../../../../utils/helpers.js'
5+ import type { Coin } from '@injectivelabs/ts-types'
56import type { ExecArgs } from '../exec-args.js'
67
78export declare namespace MsgExecuteContractCompat {
89 export interface Params {
910 /* Keep in mind that funds have to be lexicographically sorted by denom */
10- funds ?:
11- | {
12- denom : string
13- amount : string
14- }
15- | {
16- denom : string
17- amount : string
18- } [ ]
11+ funds ?: Coin | Coin [ ]
1912 sender : string
2013 contractAddress : string
2114
You can’t perform that action at this time.
0 commit comments