@rabby-wallet/rabby-api 0.7.8 → 0.7.9

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.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AxiosAdapter, AxiosRequestConfig } from 'axios';
2
2
  import { RateLimitedAxiosInstance } from 'axios-rate-limit';
3
- import { AddrDescResponse, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain } from './types';
3
+ import { AddrDescResponse, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain } from './types';
4
4
  import { InitOptions, RabbyApiPlugin } from './plugins/intf';
5
5
  interface OpenApiStore {
6
6
  host: string;
@@ -512,18 +512,6 @@ export declare class OpenApiService {
512
512
  error_code: number;
513
513
  }>;
514
514
  getSupportedChains: () => Promise<SupportedChain[]>;
515
- searchChainList: (params?: {
516
- limit?: number;
517
- start?: number;
518
- q?: string;
519
- }) => Promise<{
520
- page: {
521
- start: number;
522
- limit: number;
523
- total: number;
524
- };
525
- chain_list: ChainListItem[];
526
- }>;
527
515
  getHistoryCurve: (addr: string) => Promise<HistoryCurve>;
528
516
  getHistoryCurveSupportedList: () => Promise<{
529
517
  supported_chains: string[];
package/dist/index.js CHANGED
@@ -894,12 +894,6 @@ export class OpenApiService {
894
894
  const { data } = yield this.request.get('/v1/wallet/supported_chains');
895
895
  return data;
896
896
  });
897
- this.searchChainList = (params) => __awaiter(this, void 0, void 0, function* () {
898
- const { data } = yield this.request.get('/v1/chain/total_list', {
899
- params,
900
- });
901
- return data;
902
- });
903
897
  this.getHistoryCurve = (addr) => __awaiter(this, void 0, void 0, function* () {
904
898
  const { data } = yield this.request.get('/v1/user/history_curve', {
905
899
  params: { id: addr },
package/dist/types.d.ts CHANGED
@@ -856,6 +856,15 @@ export interface RevokePermit2Action {
856
856
  spender: string;
857
857
  token: TokenItem;
858
858
  }
859
+ export interface SwapOrderAction {
860
+ pay_token_list: TokenItem[];
861
+ pay_nft_list: NFTItem[];
862
+ takers: string[];
863
+ receive_token_list: TokenItem[];
864
+ receive_nft_list: NFTItem[];
865
+ receiver: string | null;
866
+ expire_at: string | null;
867
+ }
859
868
  export interface SwapAction {
860
869
  pay_token: TokenItem;
861
870
  receive_token: SwapReceiveToken;
@@ -881,7 +890,7 @@ export declare type RevokeNFTCollectionAction = ApproveNFTCollectionAction;
881
890
  export interface ParseTxResponse {
882
891
  action: {
883
892
  type: string;
884
- data: SwapAction | ApproveAction | SendAction | SendNFTAction | ApproveNFTAction | RevokeNFTAction | ApproveNFTCollectionAction | RevokeNFTCollectionAction | RevokeTokenApproveAction | WrapTokenAction | UnWrapTokenAction | PushMultiSigAction | CrossSwapAction | CrossTokenAction | RevokePermit2Action | null;
893
+ data: SwapAction | ApproveAction | SendAction | SendNFTAction | ApproveNFTAction | RevokeNFTAction | ApproveNFTCollectionAction | RevokeNFTCollectionAction | RevokeTokenApproveAction | WrapTokenAction | UnWrapTokenAction | PushMultiSigAction | CrossSwapAction | CrossTokenAction | RevokePermit2Action | SwapOrderAction | null;
885
894
  };
886
895
  contract_call?: {
887
896
  func: string;
@@ -899,7 +908,7 @@ export interface CollectionWithFloorPrice {
899
908
  name: string;
900
909
  floor_price: number;
901
910
  }
902
- export declare type TypedDataActionName = 'permit1_approve_token' | 'swap_token_order' | 'permit2_approve_token' | 'sell_nft_order' | 'sign_multisig' | 'buy_nft_order' | 'create_key' | 'verify_address' | 'sell_nft_list_order' | 'permit2_approve_token_list' | 'create_cobo_safe' | 'submit_safe_role_modification' | 'submit_delegated_address_modification' | 'submit_token_approval_modification' | 'send_token';
911
+ export declare type TypedDataActionName = 'permit1_approve_token' | 'swap_token_order' | 'permit2_approve_token' | 'sell_nft_order' | 'sign_multisig' | 'buy_nft_order' | 'create_key' | 'verify_address' | 'sell_nft_list_order' | 'permit2_approve_token_list' | 'create_cobo_safe' | 'submit_safe_role_modification' | 'submit_delegated_address_modification' | 'submit_token_approval_modification' | 'send_token' | 'permit1_revoke_token' | 'swap_order';
903
912
  export interface BuyNFTOrderAction {
904
913
  expire_at: string;
905
914
  pay_token: TokenItem;
@@ -987,7 +996,7 @@ export interface ParseTypedDataResponse {
987
996
  action: {
988
997
  type: TypedDataActionName;
989
998
  expire_at?: number;
990
- data: SellNFTOrderAction | BuyNFTOrderAction | SwapTokenOrderAction | PermitAction | Permit2Action | SignMultiSigActions | CreateKeyAction | VerifyAddressAction | BatchSellNFTOrderAction | BatchPermit2Action | CreateCoboSafeAction | SubmitSafeRoleModificationAction | SubmitDelegatedAddressModificationAction | SubmitTokenApprovalModificationAction | SendAction;
999
+ data: SellNFTOrderAction | BuyNFTOrderAction | SwapTokenOrderAction | PermitAction | Permit2Action | SignMultiSigActions | CreateKeyAction | VerifyAddressAction | BatchSellNFTOrderAction | BatchPermit2Action | CreateCoboSafeAction | SubmitSafeRoleModificationAction | SubmitDelegatedAddressModificationAction | SubmitTokenApprovalModificationAction | SendAction | SwapOrderAction | RevokeTokenApproveAction;
991
1000
  } | null;
992
1001
  }
993
1002
  export declare type TextActionName = 'create_key' | 'verify_address';
@@ -1139,18 +1148,6 @@ export interface SupportedChain {
1139
1148
  is_disabled: boolean;
1140
1149
  explorer_host: string;
1141
1150
  }
1142
- export interface ChainListItem {
1143
- chain_id: number;
1144
- name: string;
1145
- short_name: string;
1146
- native_currency: {
1147
- name: string;
1148
- symbol: string;
1149
- decimals: number;
1150
- };
1151
- explorer: string | null;
1152
- rpc: null | string;
1153
- }
1154
1151
  export interface HistoryCurve {
1155
1152
  create_at: number;
1156
1153
  executor_name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [