@msafe/sui3-sdk 0.0.64 → 0.0.65
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 +100 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -31
- package/dist/index.d.ts +31 -31
- package/dist/index.js +62 -63
- package/dist/index.js.map +1 -1
- package/package.json +10 -13
- package/src/backend/BackendImpl.ts +2 -2
- package/src/backend/interface.ts +2 -2
- package/src/core/AddressBookSDK.ts +1 -1
- package/src/core/CreateHelper.ts +3 -3
- package/src/core/InvitationSDK.ts +1 -1
- package/src/core/MSafeAccount.ts +25 -26
- package/src/core/MSafeClient.ts +1 -1
- package/src/core/PublicKeyHelper.ts +6 -6
- package/src/core/ReportSDK.ts +1 -1
- package/src/globals/MSafeGlobals.ts +6 -6
- package/src/globals/const.ts +9 -9
- package/src/simulate/simulator.ts +6 -6
- package/src/types/assets.ts +1 -1
- package/src/types/msafe.ts +4 -4
- package/src/types/wallet.ts +7 -7
- package/src/utils/coin.ts +5 -5
- package/src/utils/crypto.ts +3 -3
- package/src/utils/format.ts +4 -4
- package/src/utils/iter/object.ts +28 -28
- package/src/utils/sui.ts +10 -10
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
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/
|
|
3
|
-
import * as
|
|
4
|
-
import { PublicKey, SerializedSignature, SignatureWithBytes } from '@
|
|
5
|
-
import * as
|
|
6
|
-
import { ExecuteTransactionRequestType,
|
|
7
|
-
import { TransactionBlock } from '@
|
|
1
|
+
import * as _msafe_iota_utils from '@msafe/iota-utils';
|
|
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/iota-utils';
|
|
3
|
+
import * as _iota_iota_sdk_cryptography from '@iota/iota-sdk/cryptography';
|
|
4
|
+
import { PublicKey, SerializedSignature, SignatureWithBytes } from '@iota/iota-sdk/cryptography';
|
|
5
|
+
import * as _iota_iota_sdk_client from '@iota/iota-sdk/client';
|
|
6
|
+
import { ExecuteTransactionRequestType, IotaTransactionBlockResponseOptions, IotaTransactionBlockResponse, IotaClient, GasCostSummary, IotaObjectRef, DryRunTransactionBlockResponse, CoinMetadata, IotaObjectDataOptions, IotaObjectResponse, IotaObjectData, CoinStruct } from '@iota/iota-sdk/client';
|
|
7
|
+
import { TransactionBlock } from '@iota/iota-sdk/transactions';
|
|
8
8
|
import { Buffer } from 'buffer';
|
|
9
9
|
|
|
10
10
|
interface IBackend {
|
|
@@ -55,7 +55,7 @@ declare enum MSafeEnv {
|
|
|
55
55
|
prod = "prod"
|
|
56
56
|
}
|
|
57
57
|
interface MSafeConfig {
|
|
58
|
-
|
|
58
|
+
client: {
|
|
59
59
|
url: string;
|
|
60
60
|
};
|
|
61
61
|
backend: {
|
|
@@ -65,7 +65,7 @@ interface MSafeConfig {
|
|
|
65
65
|
network: 'sui:mainnet' | 'sui:testnet';
|
|
66
66
|
}
|
|
67
67
|
interface MSafeConfigOptions {
|
|
68
|
-
|
|
68
|
+
client?: {
|
|
69
69
|
url?: string;
|
|
70
70
|
};
|
|
71
71
|
backend?: {
|
|
@@ -96,18 +96,18 @@ interface IWallet {
|
|
|
96
96
|
signAndExecuteTransactionBlock(input: {
|
|
97
97
|
transactionBlock: TransactionBlock;
|
|
98
98
|
requestType?: ExecuteTransactionRequestType;
|
|
99
|
-
options?:
|
|
100
|
-
}): Promise<
|
|
99
|
+
options?: IotaTransactionBlockResponseOptions;
|
|
100
|
+
}): Promise<IotaTransactionBlockResponse>;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
declare class MSafeGlobals {
|
|
104
104
|
readonly backend: IBackend;
|
|
105
|
-
readonly
|
|
105
|
+
readonly client: IotaClient;
|
|
106
106
|
readonly config: MSafeConfig;
|
|
107
107
|
_wallet: IWallet | undefined;
|
|
108
108
|
constructor(input: {
|
|
109
109
|
backend: IBackend;
|
|
110
|
-
|
|
110
|
+
client: IotaClient;
|
|
111
111
|
config: MSafeConfig;
|
|
112
112
|
});
|
|
113
113
|
static New(env: MSafeEnv, options?: MSafeConfigOptions): Promise<MSafeGlobals>;
|
|
@@ -206,7 +206,7 @@ interface SimulationResult {
|
|
|
206
206
|
gasPrice: bigint;
|
|
207
207
|
gasUsed: GasCostSummary;
|
|
208
208
|
gasBudget: bigint;
|
|
209
|
-
gasObject:
|
|
209
|
+
gasObject: IotaObjectRef;
|
|
210
210
|
simulationError?: string;
|
|
211
211
|
response?: DryRunTransactionBlockResponse;
|
|
212
212
|
}
|
|
@@ -253,7 +253,7 @@ declare class CreateHelper {
|
|
|
253
253
|
declare class AddressBookSDK {
|
|
254
254
|
readonly globals: MSafeGlobals;
|
|
255
255
|
constructor(globals: MSafeGlobals);
|
|
256
|
-
getEntries(pagination?: IPageOptions): Promise<
|
|
256
|
+
getEntries(pagination?: IPageOptions): Promise<_msafe_iota_utils.IGetAddressBookResult>;
|
|
257
257
|
update(updates: UpdateAddressBookEntry[]): Promise<void>;
|
|
258
258
|
getMode(): Promise<AddressBookMode>;
|
|
259
259
|
setMode(mode: AddressBookMode): Promise<void>;
|
|
@@ -299,11 +299,11 @@ interface OwnedCoin {
|
|
|
299
299
|
metadata?: CoinMetadata;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
type ObjectFilter = (objRes:
|
|
302
|
+
type ObjectFilter = (objRes: IotaObjectResponse) => boolean;
|
|
303
303
|
interface BatchObjectOptions {
|
|
304
304
|
filter?: ObjectFilter;
|
|
305
305
|
pageSize?: number;
|
|
306
|
-
objectOptions?:
|
|
306
|
+
objectOptions?: IotaObjectDataOptions;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
declare class MSafeAccount {
|
|
@@ -315,10 +315,10 @@ declare class MSafeAccount {
|
|
|
315
315
|
constructor(globals: MSafeGlobals, info: IMSafeConfig);
|
|
316
316
|
static New(globals: MSafeGlobals, address: string): Promise<void>;
|
|
317
317
|
ownedCoins(): Promise<OwnedCoin[]>;
|
|
318
|
-
ownedObjects(options?: BatchObjectOptions): Promise<
|
|
318
|
+
ownedObjects(options?: BatchObjectOptions): Promise<IotaObjectData[]>;
|
|
319
319
|
pendingTransaction(): Promise<PendingTx | undefined>;
|
|
320
|
-
historyTransaction(pagination?: Pagination): Promise<
|
|
321
|
-
futureIntentions(pagination?: Pagination): Promise<
|
|
320
|
+
historyTransaction(pagination?: Pagination): Promise<_msafe_iota_utils.GetHistoryTransactionsResponse>;
|
|
321
|
+
futureIntentions(pagination?: Pagination): Promise<_msafe_iota_utils.GetTransactionIntentionsResponse>;
|
|
322
322
|
currentSequenceNumber(): Promise<number>;
|
|
323
323
|
nextSequenceNumber(): Promise<number>;
|
|
324
324
|
simulateIntention(request: Omit<IProposeIntentionRequest, 'msafeAddress' | 'signature'>): Promise<SimulationResult>;
|
|
@@ -340,15 +340,15 @@ declare class MSafeAccount {
|
|
|
340
340
|
forceBuild: boolean;
|
|
341
341
|
}): Promise<void>;
|
|
342
342
|
skipNextFailedIntention(): Promise<void>;
|
|
343
|
-
executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<
|
|
344
|
-
dashboard(): Promise<
|
|
343
|
+
executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<_iota_iota_sdk_client.IotaTransactionBlockResponse>;
|
|
344
|
+
dashboard(): Promise<_msafe_iota_utils.IGetDashboardResp>;
|
|
345
345
|
private calculateWeightFromVotes;
|
|
346
346
|
private calculateWeight;
|
|
347
347
|
get address(): string;
|
|
348
348
|
private get backend();
|
|
349
349
|
private get wallet();
|
|
350
350
|
private userAddress;
|
|
351
|
-
private get
|
|
351
|
+
private get client();
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
declare class ReportSDK {
|
|
@@ -368,7 +368,7 @@ declare class MSafeClient {
|
|
|
368
368
|
jwtToken?: JWTToken;
|
|
369
369
|
}): Promise<JWTToken>;
|
|
370
370
|
private authSign;
|
|
371
|
-
userInfo(): Promise<
|
|
371
|
+
userInfo(): Promise<_msafe_iota_utils.IUserInfoResp>;
|
|
372
372
|
ownedMSafe(pagination?: IPageOptions): Promise<IPagedResult<IMSafeConfig>>;
|
|
373
373
|
createAccount(info: CreateMSafeInfo): Promise<string>;
|
|
374
374
|
getMSafeAccount(info: IMSafeConfig): MSafeAccount;
|
|
@@ -393,11 +393,11 @@ declare class SignatureVerifier {
|
|
|
393
393
|
message: Uint8Array;
|
|
394
394
|
messageType: 'TransactionBlock' | 'Personal';
|
|
395
395
|
signature: SerializedSignature;
|
|
396
|
-
}): Promise<
|
|
396
|
+
}): Promise<_iota_iota_sdk_cryptography.PublicKey>;
|
|
397
397
|
static getPublicKeyFromPersonalSignature(input: {
|
|
398
398
|
messageStr: string;
|
|
399
399
|
signature: SerializedSignature;
|
|
400
|
-
}): Promise<
|
|
400
|
+
}): Promise<_iota_iota_sdk_cryptography.PublicKey>;
|
|
401
401
|
static verifySignature(input: {
|
|
402
402
|
message: Uint8Array;
|
|
403
403
|
messageType: 'TransactionBlock' | 'Personal';
|
|
@@ -417,7 +417,7 @@ declare class SignatureVerifier {
|
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
declare class Formatter {
|
|
420
|
-
static
|
|
420
|
+
static normalizeIotaAddress(addr: string): string;
|
|
421
421
|
static normalizeStructTag(struct: string): string;
|
|
422
422
|
static isSuiAddressEqual(addr1: string, addr2: string): boolean;
|
|
423
423
|
static isSuiStructEqual(struct1: string, struct2: string): boolean;
|
|
@@ -426,9 +426,9 @@ declare class Formatter {
|
|
|
426
426
|
declare function addPrefix(s: string, prefix: string): string;
|
|
427
427
|
|
|
428
428
|
declare const SUI_COIN = "0x2::sui::SUI";
|
|
429
|
-
declare function getPublicKeyFromChain(
|
|
429
|
+
declare function getPublicKeyFromChain(client: IotaClient, address: string): Promise<PublicKey | undefined>;
|
|
430
430
|
declare function getAllCoins(input: {
|
|
431
|
-
|
|
431
|
+
client: IotaClient;
|
|
432
432
|
owner: string;
|
|
433
433
|
coinType: string | undefined;
|
|
434
434
|
}): Promise<CoinStruct[]>;
|
|
@@ -436,7 +436,7 @@ declare function getAllCoins(input: {
|
|
|
436
436
|
declare class CoinHelper {
|
|
437
437
|
private _client;
|
|
438
438
|
private _coinMetaReg;
|
|
439
|
-
constructor(client:
|
|
439
|
+
constructor(client: IotaClient);
|
|
440
440
|
getCoinMeta(coinType: string): Promise<CoinMetadata | undefined>;
|
|
441
441
|
private queryCoinMeta;
|
|
442
442
|
}
|
|
@@ -444,7 +444,7 @@ declare const COIN_TYPE_ARG_REGEX: RegExp;
|
|
|
444
444
|
declare class Coin {
|
|
445
445
|
static isCoin(type: string | undefined | null): boolean;
|
|
446
446
|
static getCoinType(type: string): string | null;
|
|
447
|
-
static getBalance(data:
|
|
447
|
+
static getBalance(data: IotaObjectData): bigint | undefined;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
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, LOCAL_API_URL, LOCAL_SYNCING_URL, MAINNET_RPC_URL, MSafeAccount, MSafeClient, type MSafeConfig, type MSafeConfigOptions, MSafeEnv, MSafeGlobals, PREV_API_URL, PROD_API_URL, type Pagination, type PendingTx, type PendingVote, type ProposeIntention, type ReceiveTransaction, SUI_COIN, SignatureVerifier, type SimulationOption, type SimulationResult, TESTNET_RPC_URL, Uint8ArrayToHex, addPrefix, getAllCoins, getMSafeConfig, getPublicKeyFromChain, stringToBuffer };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
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/
|
|
3
|
-
import * as
|
|
4
|
-
import { PublicKey, SerializedSignature, SignatureWithBytes } from '@
|
|
5
|
-
import * as
|
|
6
|
-
import { ExecuteTransactionRequestType,
|
|
7
|
-
import { TransactionBlock } from '@
|
|
1
|
+
import * as _msafe_iota_utils from '@msafe/iota-utils';
|
|
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/iota-utils';
|
|
3
|
+
import * as _iota_iota_sdk_cryptography from '@iota/iota-sdk/cryptography';
|
|
4
|
+
import { PublicKey, SerializedSignature, SignatureWithBytes } from '@iota/iota-sdk/cryptography';
|
|
5
|
+
import * as _iota_iota_sdk_client from '@iota/iota-sdk/client';
|
|
6
|
+
import { ExecuteTransactionRequestType, IotaTransactionBlockResponseOptions, IotaTransactionBlockResponse, IotaClient, GasCostSummary, IotaObjectRef, DryRunTransactionBlockResponse, CoinMetadata, IotaObjectDataOptions, IotaObjectResponse, IotaObjectData, CoinStruct } from '@iota/iota-sdk/client';
|
|
7
|
+
import { TransactionBlock } from '@iota/iota-sdk/transactions';
|
|
8
8
|
import { Buffer } from 'buffer';
|
|
9
9
|
|
|
10
10
|
interface IBackend {
|
|
@@ -55,7 +55,7 @@ declare enum MSafeEnv {
|
|
|
55
55
|
prod = "prod"
|
|
56
56
|
}
|
|
57
57
|
interface MSafeConfig {
|
|
58
|
-
|
|
58
|
+
client: {
|
|
59
59
|
url: string;
|
|
60
60
|
};
|
|
61
61
|
backend: {
|
|
@@ -65,7 +65,7 @@ interface MSafeConfig {
|
|
|
65
65
|
network: 'sui:mainnet' | 'sui:testnet';
|
|
66
66
|
}
|
|
67
67
|
interface MSafeConfigOptions {
|
|
68
|
-
|
|
68
|
+
client?: {
|
|
69
69
|
url?: string;
|
|
70
70
|
};
|
|
71
71
|
backend?: {
|
|
@@ -96,18 +96,18 @@ interface IWallet {
|
|
|
96
96
|
signAndExecuteTransactionBlock(input: {
|
|
97
97
|
transactionBlock: TransactionBlock;
|
|
98
98
|
requestType?: ExecuteTransactionRequestType;
|
|
99
|
-
options?:
|
|
100
|
-
}): Promise<
|
|
99
|
+
options?: IotaTransactionBlockResponseOptions;
|
|
100
|
+
}): Promise<IotaTransactionBlockResponse>;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
declare class MSafeGlobals {
|
|
104
104
|
readonly backend: IBackend;
|
|
105
|
-
readonly
|
|
105
|
+
readonly client: IotaClient;
|
|
106
106
|
readonly config: MSafeConfig;
|
|
107
107
|
_wallet: IWallet | undefined;
|
|
108
108
|
constructor(input: {
|
|
109
109
|
backend: IBackend;
|
|
110
|
-
|
|
110
|
+
client: IotaClient;
|
|
111
111
|
config: MSafeConfig;
|
|
112
112
|
});
|
|
113
113
|
static New(env: MSafeEnv, options?: MSafeConfigOptions): Promise<MSafeGlobals>;
|
|
@@ -206,7 +206,7 @@ interface SimulationResult {
|
|
|
206
206
|
gasPrice: bigint;
|
|
207
207
|
gasUsed: GasCostSummary;
|
|
208
208
|
gasBudget: bigint;
|
|
209
|
-
gasObject:
|
|
209
|
+
gasObject: IotaObjectRef;
|
|
210
210
|
simulationError?: string;
|
|
211
211
|
response?: DryRunTransactionBlockResponse;
|
|
212
212
|
}
|
|
@@ -253,7 +253,7 @@ declare class CreateHelper {
|
|
|
253
253
|
declare class AddressBookSDK {
|
|
254
254
|
readonly globals: MSafeGlobals;
|
|
255
255
|
constructor(globals: MSafeGlobals);
|
|
256
|
-
getEntries(pagination?: IPageOptions): Promise<
|
|
256
|
+
getEntries(pagination?: IPageOptions): Promise<_msafe_iota_utils.IGetAddressBookResult>;
|
|
257
257
|
update(updates: UpdateAddressBookEntry[]): Promise<void>;
|
|
258
258
|
getMode(): Promise<AddressBookMode>;
|
|
259
259
|
setMode(mode: AddressBookMode): Promise<void>;
|
|
@@ -299,11 +299,11 @@ interface OwnedCoin {
|
|
|
299
299
|
metadata?: CoinMetadata;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
type ObjectFilter = (objRes:
|
|
302
|
+
type ObjectFilter = (objRes: IotaObjectResponse) => boolean;
|
|
303
303
|
interface BatchObjectOptions {
|
|
304
304
|
filter?: ObjectFilter;
|
|
305
305
|
pageSize?: number;
|
|
306
|
-
objectOptions?:
|
|
306
|
+
objectOptions?: IotaObjectDataOptions;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
declare class MSafeAccount {
|
|
@@ -315,10 +315,10 @@ declare class MSafeAccount {
|
|
|
315
315
|
constructor(globals: MSafeGlobals, info: IMSafeConfig);
|
|
316
316
|
static New(globals: MSafeGlobals, address: string): Promise<void>;
|
|
317
317
|
ownedCoins(): Promise<OwnedCoin[]>;
|
|
318
|
-
ownedObjects(options?: BatchObjectOptions): Promise<
|
|
318
|
+
ownedObjects(options?: BatchObjectOptions): Promise<IotaObjectData[]>;
|
|
319
319
|
pendingTransaction(): Promise<PendingTx | undefined>;
|
|
320
|
-
historyTransaction(pagination?: Pagination): Promise<
|
|
321
|
-
futureIntentions(pagination?: Pagination): Promise<
|
|
320
|
+
historyTransaction(pagination?: Pagination): Promise<_msafe_iota_utils.GetHistoryTransactionsResponse>;
|
|
321
|
+
futureIntentions(pagination?: Pagination): Promise<_msafe_iota_utils.GetTransactionIntentionsResponse>;
|
|
322
322
|
currentSequenceNumber(): Promise<number>;
|
|
323
323
|
nextSequenceNumber(): Promise<number>;
|
|
324
324
|
simulateIntention(request: Omit<IProposeIntentionRequest, 'msafeAddress' | 'signature'>): Promise<SimulationResult>;
|
|
@@ -340,15 +340,15 @@ declare class MSafeAccount {
|
|
|
340
340
|
forceBuild: boolean;
|
|
341
341
|
}): Promise<void>;
|
|
342
342
|
skipNextFailedIntention(): Promise<void>;
|
|
343
|
-
executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<
|
|
344
|
-
dashboard(): Promise<
|
|
343
|
+
executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<_iota_iota_sdk_client.IotaTransactionBlockResponse>;
|
|
344
|
+
dashboard(): Promise<_msafe_iota_utils.IGetDashboardResp>;
|
|
345
345
|
private calculateWeightFromVotes;
|
|
346
346
|
private calculateWeight;
|
|
347
347
|
get address(): string;
|
|
348
348
|
private get backend();
|
|
349
349
|
private get wallet();
|
|
350
350
|
private userAddress;
|
|
351
|
-
private get
|
|
351
|
+
private get client();
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
declare class ReportSDK {
|
|
@@ -368,7 +368,7 @@ declare class MSafeClient {
|
|
|
368
368
|
jwtToken?: JWTToken;
|
|
369
369
|
}): Promise<JWTToken>;
|
|
370
370
|
private authSign;
|
|
371
|
-
userInfo(): Promise<
|
|
371
|
+
userInfo(): Promise<_msafe_iota_utils.IUserInfoResp>;
|
|
372
372
|
ownedMSafe(pagination?: IPageOptions): Promise<IPagedResult<IMSafeConfig>>;
|
|
373
373
|
createAccount(info: CreateMSafeInfo): Promise<string>;
|
|
374
374
|
getMSafeAccount(info: IMSafeConfig): MSafeAccount;
|
|
@@ -393,11 +393,11 @@ declare class SignatureVerifier {
|
|
|
393
393
|
message: Uint8Array;
|
|
394
394
|
messageType: 'TransactionBlock' | 'Personal';
|
|
395
395
|
signature: SerializedSignature;
|
|
396
|
-
}): Promise<
|
|
396
|
+
}): Promise<_iota_iota_sdk_cryptography.PublicKey>;
|
|
397
397
|
static getPublicKeyFromPersonalSignature(input: {
|
|
398
398
|
messageStr: string;
|
|
399
399
|
signature: SerializedSignature;
|
|
400
|
-
}): Promise<
|
|
400
|
+
}): Promise<_iota_iota_sdk_cryptography.PublicKey>;
|
|
401
401
|
static verifySignature(input: {
|
|
402
402
|
message: Uint8Array;
|
|
403
403
|
messageType: 'TransactionBlock' | 'Personal';
|
|
@@ -417,7 +417,7 @@ declare class SignatureVerifier {
|
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
declare class Formatter {
|
|
420
|
-
static
|
|
420
|
+
static normalizeIotaAddress(addr: string): string;
|
|
421
421
|
static normalizeStructTag(struct: string): string;
|
|
422
422
|
static isSuiAddressEqual(addr1: string, addr2: string): boolean;
|
|
423
423
|
static isSuiStructEqual(struct1: string, struct2: string): boolean;
|
|
@@ -426,9 +426,9 @@ declare class Formatter {
|
|
|
426
426
|
declare function addPrefix(s: string, prefix: string): string;
|
|
427
427
|
|
|
428
428
|
declare const SUI_COIN = "0x2::sui::SUI";
|
|
429
|
-
declare function getPublicKeyFromChain(
|
|
429
|
+
declare function getPublicKeyFromChain(client: IotaClient, address: string): Promise<PublicKey | undefined>;
|
|
430
430
|
declare function getAllCoins(input: {
|
|
431
|
-
|
|
431
|
+
client: IotaClient;
|
|
432
432
|
owner: string;
|
|
433
433
|
coinType: string | undefined;
|
|
434
434
|
}): Promise<CoinStruct[]>;
|
|
@@ -436,7 +436,7 @@ declare function getAllCoins(input: {
|
|
|
436
436
|
declare class CoinHelper {
|
|
437
437
|
private _client;
|
|
438
438
|
private _coinMetaReg;
|
|
439
|
-
constructor(client:
|
|
439
|
+
constructor(client: IotaClient);
|
|
440
440
|
getCoinMeta(coinType: string): Promise<CoinMetadata | undefined>;
|
|
441
441
|
private queryCoinMeta;
|
|
442
442
|
}
|
|
@@ -444,7 +444,7 @@ declare const COIN_TYPE_ARG_REGEX: RegExp;
|
|
|
444
444
|
declare class Coin {
|
|
445
445
|
static isCoin(type: string | undefined | null): boolean;
|
|
446
446
|
static getCoinType(type: string): string | null;
|
|
447
|
-
static getBalance(data:
|
|
447
|
+
static getBalance(data: IotaObjectData): bigint | undefined;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
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, LOCAL_API_URL, LOCAL_SYNCING_URL, MAINNET_RPC_URL, MSafeAccount, MSafeClient, type MSafeConfig, type MSafeConfigOptions, MSafeEnv, MSafeGlobals, PREV_API_URL, PROD_API_URL, type Pagination, type PendingTx, type PendingVote, type ProposeIntention, type ReceiveTransaction, SUI_COIN, SignatureVerifier, type SimulationOption, type SimulationResult, TESTNET_RPC_URL, Uint8ArrayToHex, addPrefix, getAllCoins, getMSafeConfig, getPublicKeyFromChain, stringToBuffer };
|