@msafe/sui3-sdk 0.0.40 → 0.0.42-pre-bbd6acd.0

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.d.cts CHANGED
@@ -1,12 +1,9 @@
1
- import * as _mysten_sui_js_src_cryptography from '@mysten/sui.js/src/cryptography';
2
- import { PublicKey as PublicKey$1 } from '@mysten/sui.js/src/cryptography';
3
1
  import * as _msafe_sui3_utils from '@msafe/sui3-utils';
4
- import { IAuthLoginReq, JWTToken, IMSafeConfig, IUserInfoResp, UserMSafeStatus, IPageOptions, IPagedResult, IGetPendingTransactionRequest, GetPendingTransactionResponse, IGetHistoryTransactionsRequest, GetHistoryTransactionsResponse, IGetIntentionsRequest, GetTransactionIntentionsResponse, IMSafeAddressRequest, TransactionIntentionItem, ICreateMSafeReq, IProposeIntentionRequest, TxIntention, IRejectTransactionRequest, IVoteTransactionRequest, IBuildTransactionRequest, ISkipIntentionRequest, IProposeIntentionAndBuildAndVoteRequest, IGetAddressBookResult, UpdateAddressBookEntry, IGetAddressBookModeResult, ISetAddressBookModeReq, Report, TransactionType, IGasOption, PublicKeyWithSchema, AddressBookMode, MultiSigAccount, CoinTransferIntention, ObjectTransferIntention, PlainPayloadIntention } from '@msafe/sui3-utils';
2
+ import { IAuthLoginReq, JWTToken, IMSafeConfig, IUserInfoResp, UserMSafeStatus, IPageOptions, IPagedResult, IGetPendingTransactionRequest, GetPendingTransactionResponse, IGetHistoryTransactionsRequest, GetHistoryTransactionsResponse, IGetIntentionsRequest, GetTransactionIntentionsResponse, IMSafeAddressRequest, TransactionIntentionItem, ICreateMSafeReq, IProposeIntentionRequest, TxIntention, IRejectTransactionRequest, IVoteTransactionRequest, IBuildTransactionRequest, ISkipIntentionRequest, IProposeIntentionAndBuildAndVoteRequest, IGetAddressBookResult, UpdateAddressBookEntry, IGetAddressBookModeResult, ISetAddressBookModeReq, Report, IGetDashboardReq, IGetDashboardResp, TransactionType, IGasOption, PublicKeyWithSchema, AddressBookMode, MultiSigAccount, CoinTransferIntention, ObjectTransferIntention, PlainPayloadIntention } from '@msafe/sui3-utils';
3
+ import * as _mysten_sui_js_cryptography from '@mysten/sui.js/cryptography';
4
+ import { PublicKey, SerializedSignature, SignatureWithBytes } from '@mysten/sui.js/cryptography';
5
5
  import * as _mysten_sui_js_client from '@mysten/sui.js/client';
6
6
  import { ExecuteTransactionRequestType, SuiTransactionBlockResponseOptions, SuiTransactionBlockResponse, SuiClient, GasCostSummary, SuiObjectRef, CoinMetadata, SuiObjectDataOptions, SuiObjectResponse, SuiObjectData, CoinStruct } from '@mysten/sui.js/client';
7
- import * as _mysten_sui_js_cryptography from '@mysten/sui.js/cryptography';
8
- import { PublicKey, SerializedSignature } from '@mysten/sui.js/cryptography';
9
- import { SignatureWithBytes } from '@mysten/sui.js/src/cryptography/keypair';
10
7
  import { TransactionBlock } from '@mysten/sui.js/transactions';
11
8
  import { Buffer } from 'buffer';
12
9
 
@@ -54,6 +51,7 @@ interface IBackend {
54
51
  getAddressBookMode(): Promise<IGetAddressBookModeResult>;
55
52
  setAddressBookMode(input: ISetAddressBookModeReq): Promise<void>;
56
53
  submitReport(report: Report): Promise<void>;
54
+ getDashboard(input: IGetDashboardReq): Promise<IGetDashboardResp>;
57
55
  }
58
56
 
59
57
  declare enum MSafeEnv {
@@ -85,7 +83,7 @@ declare const MAINNET_RPC_URL = "https://sui-mainnet.blockvision.org/v1/2Sgk7NPv
85
83
  declare const LOCAL_API_URL = "http://127.0.0.1:3000";
86
84
  declare const LOCAL_SYNCING_URL = "http://127.0.0.1:3001";
87
85
  declare const DEV_API_URL = "https://sui-dev.m-safe.link";
88
- declare const DEV_SYNCING_URL = "http://52.53.228.20";
86
+ declare const DEV_SYNCING_URL = "http://13.56.226.148:81";
89
87
  declare const PREV_API_URL = "https://sui-preview.m-safe.link";
90
88
  declare const PROD_API_URL = "https://sui.m-safe.link";
91
89
  declare const ENV_CONFIGS: Map<MSafeEnv, MSafeConfig>;
@@ -131,15 +129,16 @@ declare class PublicKeyHelper {
131
129
  readonly globals: MSafeGlobals;
132
130
  private knownPublicKeys;
133
131
  constructor(globals: MSafeGlobals);
134
- getPublicKey(address: string): Promise<PublicKey$1 | undefined>;
135
- getPublicKeyBatch(addresses: string[]): Promise<(PublicKey$1 | undefined)[]>;
136
- addPublicKey(address: string, publicKey: PublicKey$1): void;
132
+ getPublicKey(address: string): Promise<PublicKey | undefined>;
133
+ getPublicKeyBatch(addresses: string[]): Promise<(PublicKey | undefined)[]>;
134
+ addPublicKey(address: string, publicKey: PublicKey): void;
137
135
  private _getPublicKey;
138
136
  private getPublicKeyFromBackend;
139
137
  private getPublicKeyFromChain;
140
138
  }
141
139
 
142
140
  interface PendingTx {
141
+ application: string;
143
142
  txType: TransactionType;
144
143
  txSubType: string;
145
144
  digest: string;
@@ -238,7 +237,7 @@ declare class CreateHelper {
238
237
  readonly globals: MSafeGlobals;
239
238
  readonly pkHelper: PublicKeyHelper;
240
239
  constructor(globals: MSafeGlobals, pkHelper: PublicKeyHelper);
241
- getPublicKeyBatch(addresses: string[]): Promise<(_mysten_sui_js_src_cryptography.PublicKey | undefined)[]>;
240
+ getPublicKeyBatch(addresses: string[]): Promise<(PublicKey | undefined)[]>;
242
241
  calculateMSafeAddress(info: CreateMSafeInfo): Promise<string>;
243
242
  validateCreateInfo(createInfo: CreateMSafeInfo): Promise<string>;
244
243
  /**
@@ -320,6 +319,7 @@ declare class MSafeAccount {
320
319
  }): Promise<void>;
321
320
  skipNextFailedIntention(): Promise<void>;
322
321
  executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<_mysten_sui_js_client.SuiTransactionBlockResponse>;
322
+ dashboard(timezone?: string): Promise<_msafe_sui3_utils.IGetDashboardResp>;
323
323
  private calculateWeightFromVotes;
324
324
  private calculateWeight;
325
325
  get address(): string;
package/dist/index.d.ts CHANGED
@@ -1,12 +1,9 @@
1
- import * as _mysten_sui_js_src_cryptography from '@mysten/sui.js/src/cryptography';
2
- import { PublicKey as PublicKey$1 } from '@mysten/sui.js/src/cryptography';
3
1
  import * as _msafe_sui3_utils from '@msafe/sui3-utils';
4
- import { IAuthLoginReq, JWTToken, IMSafeConfig, IUserInfoResp, UserMSafeStatus, IPageOptions, IPagedResult, IGetPendingTransactionRequest, GetPendingTransactionResponse, IGetHistoryTransactionsRequest, GetHistoryTransactionsResponse, IGetIntentionsRequest, GetTransactionIntentionsResponse, IMSafeAddressRequest, TransactionIntentionItem, ICreateMSafeReq, IProposeIntentionRequest, TxIntention, IRejectTransactionRequest, IVoteTransactionRequest, IBuildTransactionRequest, ISkipIntentionRequest, IProposeIntentionAndBuildAndVoteRequest, IGetAddressBookResult, UpdateAddressBookEntry, IGetAddressBookModeResult, ISetAddressBookModeReq, Report, TransactionType, IGasOption, PublicKeyWithSchema, AddressBookMode, MultiSigAccount, CoinTransferIntention, ObjectTransferIntention, PlainPayloadIntention } from '@msafe/sui3-utils';
2
+ import { IAuthLoginReq, JWTToken, IMSafeConfig, IUserInfoResp, UserMSafeStatus, IPageOptions, IPagedResult, IGetPendingTransactionRequest, GetPendingTransactionResponse, IGetHistoryTransactionsRequest, GetHistoryTransactionsResponse, IGetIntentionsRequest, GetTransactionIntentionsResponse, IMSafeAddressRequest, TransactionIntentionItem, ICreateMSafeReq, IProposeIntentionRequest, TxIntention, IRejectTransactionRequest, IVoteTransactionRequest, IBuildTransactionRequest, ISkipIntentionRequest, IProposeIntentionAndBuildAndVoteRequest, IGetAddressBookResult, UpdateAddressBookEntry, IGetAddressBookModeResult, ISetAddressBookModeReq, Report, IGetDashboardReq, IGetDashboardResp, TransactionType, IGasOption, PublicKeyWithSchema, AddressBookMode, MultiSigAccount, CoinTransferIntention, ObjectTransferIntention, PlainPayloadIntention } from '@msafe/sui3-utils';
3
+ import * as _mysten_sui_js_cryptography from '@mysten/sui.js/cryptography';
4
+ import { PublicKey, SerializedSignature, SignatureWithBytes } from '@mysten/sui.js/cryptography';
5
5
  import * as _mysten_sui_js_client from '@mysten/sui.js/client';
6
6
  import { ExecuteTransactionRequestType, SuiTransactionBlockResponseOptions, SuiTransactionBlockResponse, SuiClient, GasCostSummary, SuiObjectRef, CoinMetadata, SuiObjectDataOptions, SuiObjectResponse, SuiObjectData, CoinStruct } from '@mysten/sui.js/client';
7
- import * as _mysten_sui_js_cryptography from '@mysten/sui.js/cryptography';
8
- import { PublicKey, SerializedSignature } from '@mysten/sui.js/cryptography';
9
- import { SignatureWithBytes } from '@mysten/sui.js/src/cryptography/keypair';
10
7
  import { TransactionBlock } from '@mysten/sui.js/transactions';
11
8
  import { Buffer } from 'buffer';
12
9
 
@@ -54,6 +51,7 @@ interface IBackend {
54
51
  getAddressBookMode(): Promise<IGetAddressBookModeResult>;
55
52
  setAddressBookMode(input: ISetAddressBookModeReq): Promise<void>;
56
53
  submitReport(report: Report): Promise<void>;
54
+ getDashboard(input: IGetDashboardReq): Promise<IGetDashboardResp>;
57
55
  }
58
56
 
59
57
  declare enum MSafeEnv {
@@ -85,7 +83,7 @@ declare const MAINNET_RPC_URL = "https://sui-mainnet.blockvision.org/v1/2Sgk7NPv
85
83
  declare const LOCAL_API_URL = "http://127.0.0.1:3000";
86
84
  declare const LOCAL_SYNCING_URL = "http://127.0.0.1:3001";
87
85
  declare const DEV_API_URL = "https://sui-dev.m-safe.link";
88
- declare const DEV_SYNCING_URL = "http://52.53.228.20";
86
+ declare const DEV_SYNCING_URL = "http://13.56.226.148:81";
89
87
  declare const PREV_API_URL = "https://sui-preview.m-safe.link";
90
88
  declare const PROD_API_URL = "https://sui.m-safe.link";
91
89
  declare const ENV_CONFIGS: Map<MSafeEnv, MSafeConfig>;
@@ -131,15 +129,16 @@ declare class PublicKeyHelper {
131
129
  readonly globals: MSafeGlobals;
132
130
  private knownPublicKeys;
133
131
  constructor(globals: MSafeGlobals);
134
- getPublicKey(address: string): Promise<PublicKey$1 | undefined>;
135
- getPublicKeyBatch(addresses: string[]): Promise<(PublicKey$1 | undefined)[]>;
136
- addPublicKey(address: string, publicKey: PublicKey$1): void;
132
+ getPublicKey(address: string): Promise<PublicKey | undefined>;
133
+ getPublicKeyBatch(addresses: string[]): Promise<(PublicKey | undefined)[]>;
134
+ addPublicKey(address: string, publicKey: PublicKey): void;
137
135
  private _getPublicKey;
138
136
  private getPublicKeyFromBackend;
139
137
  private getPublicKeyFromChain;
140
138
  }
141
139
 
142
140
  interface PendingTx {
141
+ application: string;
143
142
  txType: TransactionType;
144
143
  txSubType: string;
145
144
  digest: string;
@@ -238,7 +237,7 @@ declare class CreateHelper {
238
237
  readonly globals: MSafeGlobals;
239
238
  readonly pkHelper: PublicKeyHelper;
240
239
  constructor(globals: MSafeGlobals, pkHelper: PublicKeyHelper);
241
- getPublicKeyBatch(addresses: string[]): Promise<(_mysten_sui_js_src_cryptography.PublicKey | undefined)[]>;
240
+ getPublicKeyBatch(addresses: string[]): Promise<(PublicKey | undefined)[]>;
242
241
  calculateMSafeAddress(info: CreateMSafeInfo): Promise<string>;
243
242
  validateCreateInfo(createInfo: CreateMSafeInfo): Promise<string>;
244
243
  /**
@@ -320,6 +319,7 @@ declare class MSafeAccount {
320
319
  }): Promise<void>;
321
320
  skipNextFailedIntention(): Promise<void>;
322
321
  executePendingTx(pending: PendingTx, isRejectTx?: boolean): Promise<_mysten_sui_js_client.SuiTransactionBlockResponse>;
322
+ dashboard(timezone?: string): Promise<_msafe_sui3_utils.IGetDashboardResp>;
323
323
  private calculateWeightFromVotes;
324
324
  private calculateWeight;
325
325
  get address(): string;