@firmachain/firma-js 0.2.52 → 0.2.54

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.
@@ -2,20 +2,22 @@ import { FirmaConfig } from "./FirmaConfig";
2
2
  import { FirmaCosmWasmService } from "./FirmaCosmWasmService";
3
3
  import { FirmaWalletService } from "./FirmaWalletService";
4
4
  import { TxMisc } from "./firmachain/common";
5
- export interface ExpiresAtHeight {
5
+ import { EncodeObject } from "@cosmjs/proto-signing";
6
+ import { BroadcastTxResponse } from "./firmachain/common/stargateclient";
7
+ export interface Cw721ExpiresAtHeight {
6
8
  at_height: number;
7
9
  }
8
- export interface ExpiresAtTime {
10
+ export interface Cw721ExpiresAtTime {
9
11
  at_time: number;
10
12
  }
11
- export interface ExpiresNever {
13
+ export interface Cw721ExpiresNever {
12
14
  never: {};
13
15
  }
14
- export declare type Expires = ExpiresAtHeight | ExpiresAtTime | ExpiresNever;
16
+ export declare type Cw721Expires = Cw721ExpiresAtHeight | Cw721ExpiresAtTime | Cw721ExpiresNever;
15
17
  interface OwnershipResponse {
16
18
  owner: string | null;
17
19
  pending_owner: string | null;
18
- pending_expiry: Expires | null;
20
+ pending_expiry: Cw721Expires | null;
19
21
  }
20
22
  export interface Cw721NftInfo {
21
23
  access: {
@@ -33,45 +35,72 @@ export interface Cw721ContractInfo {
33
35
  }
34
36
  export interface Cw721Approval {
35
37
  spender: string;
36
- expires: Expires;
38
+ expires: Cw721Expires;
39
+ }
40
+ export declare class Cw721MsgData {
41
+ static getMsgDataMint(owner: string, token_id: string, token_uri: string): string;
42
+ static getMsgDataBurn(token_id: string): string;
43
+ static getMsgDataTransfer(recipient: string, token_id: string): string;
44
+ static getMsgDataApprove(spender: string, token_id: string, expires: Cw721Expires): string;
45
+ static getMsgDataRevoke(spender: string, token_id: string): string;
46
+ static getMsgDataApproveAll(operator: string, expires: Cw721Expires): string;
47
+ static getMsgDataRevokeAll(operator: string): string;
48
+ static getMsgDataSendNft(contract: string, token_id: string, msg: any): string;
49
+ static getMsgUpdateOwnerShipTransfer(new_owner: string, expiry: Cw721Expires): string;
50
+ static getMsgUpdateOwnerShipAccept(): string;
51
+ static getMsgUpdateOwnerShipRenounce(): string;
37
52
  }
38
53
  export declare class FirmaCosmWasmCw721Service {
39
54
  private readonly config;
40
55
  private readonly cosmwasmService;
41
56
  constructor(config: FirmaConfig, cosmwasmService: FirmaCosmWasmService);
42
- mint(wallet: FirmaWalletService, contractAddress: string, owner: string, token_id: string, token_uri?: string, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
43
- burn(wallet: FirmaWalletService, contractAddress: string, token_id: string, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
44
- transfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, token_id: string, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
45
- approve(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires: Expires, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
46
- revoke(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
47
- approveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires: Expires, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
48
- revokeAll(wallet: FirmaWalletService, contractAddress: string, operator: string, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
49
- sendNft(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, token_id: string, msg: any, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
50
- updateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry: Expires, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
51
- updateOwnerShipAccept(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
52
- updateOwnerShipRenounce(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<import("./firmachain/common/stargateclient").BroadcastTxResponse>;
57
+ getCw721MsgData(): typeof Cw721MsgData;
58
+ mint(wallet: FirmaWalletService, contractAddress: string, owner: string, token_id: string, token_uri?: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
59
+ getUnsignedTxMint(wallet: FirmaWalletService, contractAddress: string, owner: string, token_id: string, token_uri?: string): Promise<EncodeObject>;
60
+ burn(wallet: FirmaWalletService, contractAddress: string, token_id: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
61
+ getUnsignedTxBurn(wallet: FirmaWalletService, contractAddress: string, token_id: string): Promise<EncodeObject>;
62
+ transfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, token_id: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
63
+ getUnsignedTxTransfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, token_id: string): Promise<EncodeObject>;
64
+ approve(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires: Cw721Expires, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
65
+ getUnsignedTxApprove(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires: Cw721Expires): Promise<EncodeObject>;
66
+ revoke(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
67
+ getUnsignedTxRevoke(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string): Promise<EncodeObject>;
68
+ approveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires: Cw721Expires, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
69
+ getUnsignedTxApproveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires: Cw721Expires): Promise<EncodeObject>;
70
+ revokeAll(wallet: FirmaWalletService, contractAddress: string, operator: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
71
+ getUnsignedTxRevokeAll(wallet: FirmaWalletService, contractAddress: string, operator: string): Promise<EncodeObject>;
72
+ sendNft(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, token_id: string, msg: any, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
73
+ getUnsignedTxSendNft(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, token_id: string, msg: any): Promise<EncodeObject>;
74
+ updateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry: Cw721Expires, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
75
+ getUnsignedTxUpdateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry: Cw721Expires): Promise<EncodeObject>;
76
+ updateOwnerShipAccept(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
77
+ getUnsignedTxUpdateOwnerShipAccept(wallet: FirmaWalletService, contractAddress: string): Promise<EncodeObject>;
78
+ updateOwnerShipRenounce(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
79
+ getUnsignedTxUpdateOwnerShipRenounce(wallet: FirmaWalletService, contractAddress: string): Promise<EncodeObject>;
80
+ signAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
81
+ getGasEstimationSignAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<number>;
53
82
  getGasEstimationMint(wallet: FirmaWalletService, contractAddress: string, owner: string, token_id: string, token_uri?: string): Promise<number>;
54
83
  getGasEstimationBurn(wallet: FirmaWalletService, contractAddress: string, token_id: string): Promise<number>;
55
84
  getGasEstimationTransfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, token_id: string): Promise<number>;
56
- getGasEstimationApprove(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires: Expires): Promise<number>;
85
+ getGasEstimationApprove(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string, expires: Cw721Expires): Promise<number>;
57
86
  getGasEstimationRevoke(wallet: FirmaWalletService, contractAddress: string, spender: string, token_id: string): Promise<number>;
58
- getGasEstimationApproveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires: Expires): Promise<number>;
87
+ getGasEstimationApproveAll(wallet: FirmaWalletService, contractAddress: string, operator: string, expires: Cw721Expires): Promise<number>;
59
88
  getGasEstimationRevokeAll(wallet: FirmaWalletService, contractAddress: string, operator: string): Promise<number>;
60
89
  getGasEstimationSendNft(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, token_id: string, msg: any): Promise<number>;
61
- getGasEstimationUpdateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry: Expires): Promise<number>;
90
+ getGasEstimationUpdateOwnerShipTransfer(wallet: FirmaWalletService, contractAddress: string, new_owner: string, expiry: Cw721Expires): Promise<number>;
62
91
  getGasEstimationUpdateOwnerShipAccept(wallet: FirmaWalletService, contractAddress: string): Promise<number>;
63
92
  getGasEstimationUpdateOwnerShipRenounce(wallet: FirmaWalletService, contractAddress: string): Promise<number>;
64
93
  getOwnerFromNftID(contractAddress: string, tokenId: string): Promise<string>;
65
94
  getApproval(contractAddress: string, tokenId: string, spender: string, isIncludeExpired?: boolean): Promise<Cw721Approval>;
66
95
  getApprovals(contractAddress: string, tokenId: string, isIncludeExpired?: boolean): Promise<Cw721Approval[]>;
67
- getAllOperators(contractAddress: string, owner: string, isIncludeExpired?: boolean): Promise<Cw721Approval[]>;
96
+ getAllOperators(contractAddress: string, owner: string, isIncludeExpired?: boolean, limit?: number, start_after?: string): Promise<Cw721Approval[]>;
68
97
  getOperator(contractAddress: string, owner: string, operator: string, isIncludeExpired?: boolean): Promise<Cw721Approval>;
69
98
  getTotalNfts(contractAddress: string): Promise<number>;
70
99
  getContractInfo(contractAddress: string): Promise<Cw721ContractInfo>;
71
100
  getNftTokenUri(contractAddress: string, tokenId: string): Promise<string>;
72
101
  getNftData(contractAddress: string, tokenId: string): Promise<Cw721NftInfo>;
73
- getNFTIdListOfOwner(contractAddress: string, owner: string): Promise<string[]>;
74
- getAllNftIdList(contractAddress: string): Promise<string[]>;
102
+ getNFTIdListOfOwner(contractAddress: string, owner: string, limit?: number, start_after?: string): Promise<string[]>;
103
+ getAllNftIdList(contractAddress: string, limit?: number, start_after?: string): Promise<string[]>;
75
104
  getMinter(contractAddress: string): Promise<string>;
76
105
  getExtension(contractAddress: string): Promise<any>;
77
106
  getOwnerShip(contractAddress: string): Promise<OwnershipResponse>;