@msafe/sui3-sdk 1.0.6 → 1.0.7
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/index.cjs +400 -307
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -53
- package/dist/index.d.ts +24 -53
- package/dist/index.js +409 -333
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -2,9 +2,8 @@ import * as _msafe_sui3_utils from '@msafe/sui3-utils';
|
|
|
2
2
|
import { IAuthLoginReq, JWTToken, IMSafeConfig, IUserInfoResp, UserMSafeStatus, IPageOptions, IPagedResult, IGetPendingTransactionRequest, GetPendingTransactionResponse, IGetHistoryTransactionsRequest, GetHistoryTransactionsResponse, IGetIntentionsRequest, GetTransactionIntentionsResponse, IMSafeAddressRequest, TransactionIntentionItem, ICreateMSafeReq, IProposeIntentionRequest, IRejectTransactionRequest, IVoteTransactionRequest, IBuildTransactionRequest, ISkipIntentionRequest, IProposeIntentionAndBuildAndVoteRequest, IGetAddressBookResult, UpdateAddressBookEntry, IGetAddressBookModeResult, ISetAddressBookModeReq, Report, IGetDashboardReq, IGetDashboardResp, TransactionType, TxIntention, IGasOption, PublicKeyWithSchema, AddressBookMode, MultiSigAccount, CoinTransferIntention, ObjectTransferIntention, PlainPayloadIntention } from '@msafe/sui3-utils';
|
|
3
3
|
import * as _mysten_sui_cryptography from '@mysten/sui/cryptography';
|
|
4
4
|
import { PublicKey, SignatureWithBytes } from '@mysten/sui/cryptography';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { SuiClientTypes } from '@mysten/sui/client';
|
|
5
|
+
import * as _mysten_sui_jsonRpc from '@mysten/sui/jsonRpc';
|
|
6
|
+
import { JsonRpcTransport, ExecuteTransactionRequestType, SuiTransactionBlockResponseOptions, SuiTransactionBlockResponse, SuiJsonRpcClient, GasCostSummary, SuiObjectRef, DryRunTransactionBlockResponse, CoinMetadata, SuiObjectDataOptions, SuiObjectResponse, SuiObjectData, CoinStruct } from '@mysten/sui/jsonRpc';
|
|
8
7
|
import { Transaction } from '@mysten/sui/transactions';
|
|
9
8
|
import { Buffer } from 'buffer';
|
|
10
9
|
|
|
@@ -98,12 +97,10 @@ declare enum MSafeEnv {
|
|
|
98
97
|
prev = "prev",
|
|
99
98
|
prod = "prod"
|
|
100
99
|
}
|
|
101
|
-
/** Normalize HTTP(S) fullnode URL for SuiGrpcClient (gRPC-web) baseUrl. */
|
|
102
|
-
declare function httpUrlToGrpcBaseUrl(url: string): string;
|
|
103
100
|
interface MSafeConfig {
|
|
104
101
|
suiClient: {
|
|
105
102
|
url: string;
|
|
106
|
-
transport?:
|
|
103
|
+
transport?: JsonRpcTransport;
|
|
107
104
|
};
|
|
108
105
|
backend: {
|
|
109
106
|
url: string;
|
|
@@ -114,7 +111,7 @@ interface MSafeConfig {
|
|
|
114
111
|
interface MSafeConfigOptions {
|
|
115
112
|
suiClient?: {
|
|
116
113
|
url: string;
|
|
117
|
-
transport?:
|
|
114
|
+
transport?: JsonRpcTransport;
|
|
118
115
|
};
|
|
119
116
|
backend?: {
|
|
120
117
|
url?: string;
|
|
@@ -143,18 +140,19 @@ interface IWallet {
|
|
|
143
140
|
}): Promise<SignatureWithBytes>;
|
|
144
141
|
signAndExecuteTransactionBlock(input: {
|
|
145
142
|
transactionBlock: Transaction | Uint8Array;
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
requestType?: ExecuteTransactionRequestType;
|
|
144
|
+
options?: SuiTransactionBlockResponseOptions;
|
|
145
|
+
}): Promise<SuiTransactionBlockResponse>;
|
|
148
146
|
}
|
|
149
147
|
|
|
150
148
|
declare class MSafeGlobals {
|
|
151
149
|
readonly backend: IBackend;
|
|
152
|
-
readonly suiClient:
|
|
150
|
+
readonly suiClient: SuiJsonRpcClient;
|
|
153
151
|
readonly config: MSafeConfig;
|
|
154
152
|
_wallet: IWallet | undefined;
|
|
155
153
|
constructor(input: {
|
|
156
154
|
backend: IBackend;
|
|
157
|
-
suiClient:
|
|
155
|
+
suiClient: SuiJsonRpcClient;
|
|
158
156
|
config: MSafeConfig;
|
|
159
157
|
});
|
|
160
158
|
static New(env: MSafeEnv, options?: MSafeConfigOptions): Promise<MSafeGlobals>;
|
|
@@ -179,15 +177,6 @@ declare class PublicKeyHelper {
|
|
|
179
177
|
private getPublicKeyFromChain;
|
|
180
178
|
}
|
|
181
179
|
|
|
182
|
-
/** Gas coin reference derived from simulation / execution effects. */
|
|
183
|
-
interface GasObjectReference {
|
|
184
|
-
objectId: string;
|
|
185
|
-
version: string;
|
|
186
|
-
digest: string;
|
|
187
|
-
}
|
|
188
|
-
type SimulateDryRunResponse = SuiClientTypes.SimulateTransactionResult<{
|
|
189
|
-
effects: true;
|
|
190
|
-
}>;
|
|
191
180
|
interface PendingTx {
|
|
192
181
|
application: string;
|
|
193
182
|
txType: TransactionType;
|
|
@@ -261,15 +250,15 @@ type SimulationResult = SimulationSuccessResult | SimulationFailedResult;
|
|
|
261
250
|
interface SimulationSuccessResult {
|
|
262
251
|
success: true;
|
|
263
252
|
gasPrice: bigint;
|
|
264
|
-
gasUsed:
|
|
253
|
+
gasUsed: GasCostSummary;
|
|
265
254
|
gasBudget: bigint;
|
|
266
|
-
gasObject:
|
|
267
|
-
response:
|
|
255
|
+
gasObject: SuiObjectRef;
|
|
256
|
+
response: DryRunTransactionBlockResponse;
|
|
268
257
|
}
|
|
269
258
|
interface SimulationFailedResult {
|
|
270
259
|
success: false;
|
|
271
260
|
gasPrice: bigint;
|
|
272
|
-
response
|
|
261
|
+
response: DryRunTransactionBlockResponse;
|
|
273
262
|
simulationError: string;
|
|
274
263
|
}
|
|
275
264
|
interface SimulationOption extends IGasOption {
|
|
@@ -340,23 +329,17 @@ declare class Simulator {
|
|
|
340
329
|
private copyTransaction;
|
|
341
330
|
}
|
|
342
331
|
|
|
343
|
-
type CoinMetadata = SuiClientTypes.CoinMetadata;
|
|
344
332
|
interface OwnedCoin {
|
|
345
333
|
type: string;
|
|
346
334
|
balance: bigint;
|
|
347
335
|
metadata?: CoinMetadata;
|
|
348
336
|
}
|
|
349
337
|
|
|
350
|
-
|
|
351
|
-
type OwnedObjectData = SuiClientTypes.Object<{
|
|
352
|
-
json: true;
|
|
353
|
-
}>;
|
|
354
|
-
type ObjectFilter = (obj: OwnedObjectData) => boolean;
|
|
338
|
+
type ObjectFilter = (objRes: SuiObjectResponse) => boolean;
|
|
355
339
|
interface BatchObjectOptions {
|
|
356
340
|
filter?: ObjectFilter;
|
|
357
341
|
pageSize?: number;
|
|
358
|
-
|
|
359
|
-
objectInclude?: SuiClientTypes.ObjectInclude;
|
|
342
|
+
objectOptions?: SuiObjectDataOptions;
|
|
360
343
|
}
|
|
361
344
|
|
|
362
345
|
declare class MSafeAccount {
|
|
@@ -368,7 +351,7 @@ declare class MSafeAccount {
|
|
|
368
351
|
constructor(globals: MSafeGlobals, info: IMSafeConfig);
|
|
369
352
|
static New(globals: MSafeGlobals, address: string): Promise<void>;
|
|
370
353
|
ownedCoins(): Promise<OwnedCoin[]>;
|
|
371
|
-
ownedObjects(options?: BatchObjectOptions): Promise<
|
|
354
|
+
ownedObjects(options?: BatchObjectOptions): Promise<SuiObjectData[]>;
|
|
372
355
|
pendingTransaction(): Promise<PendingTx | undefined>;
|
|
373
356
|
historyTransaction(pagination?: Pagination): Promise<_msafe_sui3_utils.GetHistoryTransactionsResponse>;
|
|
374
357
|
futureIntentions(pagination?: Pagination): Promise<_msafe_sui3_utils.GetTransactionIntentionsResponse>;
|
|
@@ -398,10 +381,7 @@ declare class MSafeAccount {
|
|
|
398
381
|
}): Promise<void>;
|
|
399
382
|
skipNextFailedIntention(): Promise<void>;
|
|
400
383
|
fetchTransaction(): Promise<string[]>;
|
|
401
|
-
executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<
|
|
402
|
-
effects: true;
|
|
403
|
-
events: true;
|
|
404
|
-
}>>;
|
|
384
|
+
executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<_mysten_sui_jsonRpc.SuiTransactionBlockResponse>;
|
|
405
385
|
dashboard(): Promise<_msafe_sui3_utils.IGetDashboardResp>;
|
|
406
386
|
private calculateWeightFromVotes;
|
|
407
387
|
private calculateWeight;
|
|
@@ -487,17 +467,17 @@ declare class Formatter {
|
|
|
487
467
|
declare function addPrefix(s: string, prefix: string): string;
|
|
488
468
|
|
|
489
469
|
declare const SUI_COIN = "0x2::sui::SUI";
|
|
490
|
-
declare function getPublicKeyFromChain(suiClient:
|
|
470
|
+
declare function getPublicKeyFromChain(suiClient: SuiJsonRpcClient, address: string): Promise<PublicKey | undefined>;
|
|
491
471
|
declare function getAllCoins(input: {
|
|
492
|
-
suiClient:
|
|
472
|
+
suiClient: SuiJsonRpcClient;
|
|
493
473
|
owner: string;
|
|
494
474
|
coinType: string | undefined;
|
|
495
|
-
}): Promise<
|
|
475
|
+
}): Promise<CoinStruct[]>;
|
|
496
476
|
|
|
497
477
|
declare class CoinHelper {
|
|
498
478
|
private _client;
|
|
499
479
|
private _coinMetaReg;
|
|
500
|
-
constructor(client:
|
|
480
|
+
constructor(client: SuiJsonRpcClient);
|
|
501
481
|
getCoinMeta(coinType: string): Promise<CoinMetadata | undefined>;
|
|
502
482
|
private queryCoinMeta;
|
|
503
483
|
}
|
|
@@ -505,21 +485,12 @@ declare const COIN_TYPE_ARG_REGEX: RegExp;
|
|
|
505
485
|
declare class Coin {
|
|
506
486
|
static isCoin(type: string | undefined | null): boolean;
|
|
507
487
|
static getCoinType(type: string): string | null;
|
|
508
|
-
static getBalance(data:
|
|
509
|
-
type?: string | null;
|
|
510
|
-
json?: Record<string, unknown> | null;
|
|
511
|
-
content?: {
|
|
512
|
-
dataType?: string;
|
|
513
|
-
fields?: {
|
|
514
|
-
balance?: string;
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
}): bigint | undefined;
|
|
488
|
+
static getBalance(data: SuiObjectData): bigint | undefined;
|
|
518
489
|
}
|
|
519
490
|
|
|
520
491
|
/**
|
|
521
|
-
* Normalize a transaction
|
|
492
|
+
* Normalize a transaction from legacy helpers (sui.js TransactionBlock) or v2 Transaction.
|
|
522
493
|
*/
|
|
523
494
|
declare function toSuiTransaction(txb: Transaction | unknown): Transaction;
|
|
524
495
|
|
|
525
|
-
export { AddressBookSDK, COIN_TYPE_ARG_REGEX, Coin, CoinHelper, CreateHelper, type CreateMSafeInfo, DEV_API_URL, DEV_SYNCING_URL, ENV_CONFIGS, Formatter, type FutureIntention,
|
|
496
|
+
export { AddressBookSDK, COIN_TYPE_ARG_REGEX, Coin, CoinHelper, CreateHelper, type CreateMSafeInfo, DEV_API_URL, DEV_SYNCING_URL, ENV_CONFIGS, Formatter, type FutureIntention, HexToUint8Array, type HistorySendTx, type HistoryVote, type IWallet, InfoTypeEnabledDto, InfoTypeKey, LOCAL_API_URL, LOCAL_SYNCING_URL, MAINNET_RPC_URL, MSafeAccount, MSafeClient, type MSafeConfig, type MSafeConfigOptions, MSafeEnabledDto, MSafeEnv, MSafeGlobals, type NotificationData, type NotificationInfo, NotificationSubscribeDto, NotificationUpdateDto, PREV_API_URL, PROD_API_URL, type Pagination, type PendingTx, type PendingVote, type ProposeIntention, type ReceiveTransaction, SUI_COIN, SignatureVerifier, type SimulationFailedResult, type SimulationOption, type SimulationResult, type SimulationSuccessResult, TESTNET_RPC_URL, Uint8ArrayToHex, addPrefix, getAllCoins, getMSafeConfig, getPublicKeyFromChain, msafeChainToSuiNetwork, stringToBuffer, toSuiTransaction };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,8 @@ import * as _msafe_sui3_utils from '@msafe/sui3-utils';
|
|
|
2
2
|
import { IAuthLoginReq, JWTToken, IMSafeConfig, IUserInfoResp, UserMSafeStatus, IPageOptions, IPagedResult, IGetPendingTransactionRequest, GetPendingTransactionResponse, IGetHistoryTransactionsRequest, GetHistoryTransactionsResponse, IGetIntentionsRequest, GetTransactionIntentionsResponse, IMSafeAddressRequest, TransactionIntentionItem, ICreateMSafeReq, IProposeIntentionRequest, IRejectTransactionRequest, IVoteTransactionRequest, IBuildTransactionRequest, ISkipIntentionRequest, IProposeIntentionAndBuildAndVoteRequest, IGetAddressBookResult, UpdateAddressBookEntry, IGetAddressBookModeResult, ISetAddressBookModeReq, Report, IGetDashboardReq, IGetDashboardResp, TransactionType, TxIntention, IGasOption, PublicKeyWithSchema, AddressBookMode, MultiSigAccount, CoinTransferIntention, ObjectTransferIntention, PlainPayloadIntention } from '@msafe/sui3-utils';
|
|
3
3
|
import * as _mysten_sui_cryptography from '@mysten/sui/cryptography';
|
|
4
4
|
import { PublicKey, SignatureWithBytes } from '@mysten/sui/cryptography';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { SuiClientTypes } from '@mysten/sui/client';
|
|
5
|
+
import * as _mysten_sui_jsonRpc from '@mysten/sui/jsonRpc';
|
|
6
|
+
import { JsonRpcTransport, ExecuteTransactionRequestType, SuiTransactionBlockResponseOptions, SuiTransactionBlockResponse, SuiJsonRpcClient, GasCostSummary, SuiObjectRef, DryRunTransactionBlockResponse, CoinMetadata, SuiObjectDataOptions, SuiObjectResponse, SuiObjectData, CoinStruct } from '@mysten/sui/jsonRpc';
|
|
8
7
|
import { Transaction } from '@mysten/sui/transactions';
|
|
9
8
|
import { Buffer } from 'buffer';
|
|
10
9
|
|
|
@@ -98,12 +97,10 @@ declare enum MSafeEnv {
|
|
|
98
97
|
prev = "prev",
|
|
99
98
|
prod = "prod"
|
|
100
99
|
}
|
|
101
|
-
/** Normalize HTTP(S) fullnode URL for SuiGrpcClient (gRPC-web) baseUrl. */
|
|
102
|
-
declare function httpUrlToGrpcBaseUrl(url: string): string;
|
|
103
100
|
interface MSafeConfig {
|
|
104
101
|
suiClient: {
|
|
105
102
|
url: string;
|
|
106
|
-
transport?:
|
|
103
|
+
transport?: JsonRpcTransport;
|
|
107
104
|
};
|
|
108
105
|
backend: {
|
|
109
106
|
url: string;
|
|
@@ -114,7 +111,7 @@ interface MSafeConfig {
|
|
|
114
111
|
interface MSafeConfigOptions {
|
|
115
112
|
suiClient?: {
|
|
116
113
|
url: string;
|
|
117
|
-
transport?:
|
|
114
|
+
transport?: JsonRpcTransport;
|
|
118
115
|
};
|
|
119
116
|
backend?: {
|
|
120
117
|
url?: string;
|
|
@@ -143,18 +140,19 @@ interface IWallet {
|
|
|
143
140
|
}): Promise<SignatureWithBytes>;
|
|
144
141
|
signAndExecuteTransactionBlock(input: {
|
|
145
142
|
transactionBlock: Transaction | Uint8Array;
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
requestType?: ExecuteTransactionRequestType;
|
|
144
|
+
options?: SuiTransactionBlockResponseOptions;
|
|
145
|
+
}): Promise<SuiTransactionBlockResponse>;
|
|
148
146
|
}
|
|
149
147
|
|
|
150
148
|
declare class MSafeGlobals {
|
|
151
149
|
readonly backend: IBackend;
|
|
152
|
-
readonly suiClient:
|
|
150
|
+
readonly suiClient: SuiJsonRpcClient;
|
|
153
151
|
readonly config: MSafeConfig;
|
|
154
152
|
_wallet: IWallet | undefined;
|
|
155
153
|
constructor(input: {
|
|
156
154
|
backend: IBackend;
|
|
157
|
-
suiClient:
|
|
155
|
+
suiClient: SuiJsonRpcClient;
|
|
158
156
|
config: MSafeConfig;
|
|
159
157
|
});
|
|
160
158
|
static New(env: MSafeEnv, options?: MSafeConfigOptions): Promise<MSafeGlobals>;
|
|
@@ -179,15 +177,6 @@ declare class PublicKeyHelper {
|
|
|
179
177
|
private getPublicKeyFromChain;
|
|
180
178
|
}
|
|
181
179
|
|
|
182
|
-
/** Gas coin reference derived from simulation / execution effects. */
|
|
183
|
-
interface GasObjectReference {
|
|
184
|
-
objectId: string;
|
|
185
|
-
version: string;
|
|
186
|
-
digest: string;
|
|
187
|
-
}
|
|
188
|
-
type SimulateDryRunResponse = SuiClientTypes.SimulateTransactionResult<{
|
|
189
|
-
effects: true;
|
|
190
|
-
}>;
|
|
191
180
|
interface PendingTx {
|
|
192
181
|
application: string;
|
|
193
182
|
txType: TransactionType;
|
|
@@ -261,15 +250,15 @@ type SimulationResult = SimulationSuccessResult | SimulationFailedResult;
|
|
|
261
250
|
interface SimulationSuccessResult {
|
|
262
251
|
success: true;
|
|
263
252
|
gasPrice: bigint;
|
|
264
|
-
gasUsed:
|
|
253
|
+
gasUsed: GasCostSummary;
|
|
265
254
|
gasBudget: bigint;
|
|
266
|
-
gasObject:
|
|
267
|
-
response:
|
|
255
|
+
gasObject: SuiObjectRef;
|
|
256
|
+
response: DryRunTransactionBlockResponse;
|
|
268
257
|
}
|
|
269
258
|
interface SimulationFailedResult {
|
|
270
259
|
success: false;
|
|
271
260
|
gasPrice: bigint;
|
|
272
|
-
response
|
|
261
|
+
response: DryRunTransactionBlockResponse;
|
|
273
262
|
simulationError: string;
|
|
274
263
|
}
|
|
275
264
|
interface SimulationOption extends IGasOption {
|
|
@@ -340,23 +329,17 @@ declare class Simulator {
|
|
|
340
329
|
private copyTransaction;
|
|
341
330
|
}
|
|
342
331
|
|
|
343
|
-
type CoinMetadata = SuiClientTypes.CoinMetadata;
|
|
344
332
|
interface OwnedCoin {
|
|
345
333
|
type: string;
|
|
346
334
|
balance: bigint;
|
|
347
335
|
metadata?: CoinMetadata;
|
|
348
336
|
}
|
|
349
337
|
|
|
350
|
-
|
|
351
|
-
type OwnedObjectData = SuiClientTypes.Object<{
|
|
352
|
-
json: true;
|
|
353
|
-
}>;
|
|
354
|
-
type ObjectFilter = (obj: OwnedObjectData) => boolean;
|
|
338
|
+
type ObjectFilter = (objRes: SuiObjectResponse) => boolean;
|
|
355
339
|
interface BatchObjectOptions {
|
|
356
340
|
filter?: ObjectFilter;
|
|
357
341
|
pageSize?: number;
|
|
358
|
-
|
|
359
|
-
objectInclude?: SuiClientTypes.ObjectInclude;
|
|
342
|
+
objectOptions?: SuiObjectDataOptions;
|
|
360
343
|
}
|
|
361
344
|
|
|
362
345
|
declare class MSafeAccount {
|
|
@@ -368,7 +351,7 @@ declare class MSafeAccount {
|
|
|
368
351
|
constructor(globals: MSafeGlobals, info: IMSafeConfig);
|
|
369
352
|
static New(globals: MSafeGlobals, address: string): Promise<void>;
|
|
370
353
|
ownedCoins(): Promise<OwnedCoin[]>;
|
|
371
|
-
ownedObjects(options?: BatchObjectOptions): Promise<
|
|
354
|
+
ownedObjects(options?: BatchObjectOptions): Promise<SuiObjectData[]>;
|
|
372
355
|
pendingTransaction(): Promise<PendingTx | undefined>;
|
|
373
356
|
historyTransaction(pagination?: Pagination): Promise<_msafe_sui3_utils.GetHistoryTransactionsResponse>;
|
|
374
357
|
futureIntentions(pagination?: Pagination): Promise<_msafe_sui3_utils.GetTransactionIntentionsResponse>;
|
|
@@ -398,10 +381,7 @@ declare class MSafeAccount {
|
|
|
398
381
|
}): Promise<void>;
|
|
399
382
|
skipNextFailedIntention(): Promise<void>;
|
|
400
383
|
fetchTransaction(): Promise<string[]>;
|
|
401
|
-
executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<
|
|
402
|
-
effects: true;
|
|
403
|
-
events: true;
|
|
404
|
-
}>>;
|
|
384
|
+
executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<_mysten_sui_jsonRpc.SuiTransactionBlockResponse>;
|
|
405
385
|
dashboard(): Promise<_msafe_sui3_utils.IGetDashboardResp>;
|
|
406
386
|
private calculateWeightFromVotes;
|
|
407
387
|
private calculateWeight;
|
|
@@ -487,17 +467,17 @@ declare class Formatter {
|
|
|
487
467
|
declare function addPrefix(s: string, prefix: string): string;
|
|
488
468
|
|
|
489
469
|
declare const SUI_COIN = "0x2::sui::SUI";
|
|
490
|
-
declare function getPublicKeyFromChain(suiClient:
|
|
470
|
+
declare function getPublicKeyFromChain(suiClient: SuiJsonRpcClient, address: string): Promise<PublicKey | undefined>;
|
|
491
471
|
declare function getAllCoins(input: {
|
|
492
|
-
suiClient:
|
|
472
|
+
suiClient: SuiJsonRpcClient;
|
|
493
473
|
owner: string;
|
|
494
474
|
coinType: string | undefined;
|
|
495
|
-
}): Promise<
|
|
475
|
+
}): Promise<CoinStruct[]>;
|
|
496
476
|
|
|
497
477
|
declare class CoinHelper {
|
|
498
478
|
private _client;
|
|
499
479
|
private _coinMetaReg;
|
|
500
|
-
constructor(client:
|
|
480
|
+
constructor(client: SuiJsonRpcClient);
|
|
501
481
|
getCoinMeta(coinType: string): Promise<CoinMetadata | undefined>;
|
|
502
482
|
private queryCoinMeta;
|
|
503
483
|
}
|
|
@@ -505,21 +485,12 @@ declare const COIN_TYPE_ARG_REGEX: RegExp;
|
|
|
505
485
|
declare class Coin {
|
|
506
486
|
static isCoin(type: string | undefined | null): boolean;
|
|
507
487
|
static getCoinType(type: string): string | null;
|
|
508
|
-
static getBalance(data:
|
|
509
|
-
type?: string | null;
|
|
510
|
-
json?: Record<string, unknown> | null;
|
|
511
|
-
content?: {
|
|
512
|
-
dataType?: string;
|
|
513
|
-
fields?: {
|
|
514
|
-
balance?: string;
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
}): bigint | undefined;
|
|
488
|
+
static getBalance(data: SuiObjectData): bigint | undefined;
|
|
518
489
|
}
|
|
519
490
|
|
|
520
491
|
/**
|
|
521
|
-
* Normalize a transaction
|
|
492
|
+
* Normalize a transaction from legacy helpers (sui.js TransactionBlock) or v2 Transaction.
|
|
522
493
|
*/
|
|
523
494
|
declare function toSuiTransaction(txb: Transaction | unknown): Transaction;
|
|
524
495
|
|
|
525
|
-
export { AddressBookSDK, COIN_TYPE_ARG_REGEX, Coin, CoinHelper, CreateHelper, type CreateMSafeInfo, DEV_API_URL, DEV_SYNCING_URL, ENV_CONFIGS, Formatter, type FutureIntention,
|
|
496
|
+
export { AddressBookSDK, COIN_TYPE_ARG_REGEX, Coin, CoinHelper, CreateHelper, type CreateMSafeInfo, DEV_API_URL, DEV_SYNCING_URL, ENV_CONFIGS, Formatter, type FutureIntention, HexToUint8Array, type HistorySendTx, type HistoryVote, type IWallet, InfoTypeEnabledDto, InfoTypeKey, LOCAL_API_URL, LOCAL_SYNCING_URL, MAINNET_RPC_URL, MSafeAccount, MSafeClient, type MSafeConfig, type MSafeConfigOptions, MSafeEnabledDto, MSafeEnv, MSafeGlobals, type NotificationData, type NotificationInfo, NotificationSubscribeDto, NotificationUpdateDto, PREV_API_URL, PROD_API_URL, type Pagination, type PendingTx, type PendingVote, type ProposeIntention, type ReceiveTransaction, SUI_COIN, SignatureVerifier, type SimulationFailedResult, type SimulationOption, type SimulationResult, type SimulationSuccessResult, TESTNET_RPC_URL, Uint8ArrayToHex, addPrefix, getAllCoins, getMSafeConfig, getPublicKeyFromChain, msafeChainToSuiNetwork, stringToBuffer, toSuiTransaction };
|