@secux/app-eth
Version:
SecuX Hardware Wallet ETH API
70 lines (66 loc) • 2.66 kB
TypeScript
/*!
Copyright 2022 SecuX Technology Inc
Copyright Chen Wei-En
Copyright Wu Tsung-Yu
Licensed under the Apache License, Version 2.0 (the License);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an AS IS BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/// <reference types="node" />
/// <reference types="node" />
import { Interface } from "@ethersproject/abi";
import { baseData, PrefixedHexString } from "./interface";
export declare class ERC1155 {
/**
* ERC1155 Function Call
* - function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data)
* @param {string} path BIP32
* @param {baseData} content
* @param {transferArgs} args
* @returns {object} prepared
* @returns {communicationData} prepared.commandData
* @returns {communicationData} prepared.rawTx
*/
static prepareSafeTransferFrom(path: string, content: baseData, args: transferArgs): {
commandData: import("@secux/utility/lib/communication").communicationData;
rawTx: import("@secux/utility/lib/communication").communicationData;
};
/**
* ERC1155 Function Call
* - function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data)
* @param {string} path BIP32
* @param {baseData} content
* @param {batchTransferArgs} args
* @returns {object} prepared
* @returns {communicationData} prepared.commandData
* @returns {communicationData} prepared.rawTx
*/
static prepareSafeBatchTransferFrom(path: string, content: baseData, args: batchTransferArgs): {
commandData: import("@secux/utility/lib/communication").communicationData;
rawTx: import("@secux/utility/lib/communication").communicationData;
};
}
export declare const erc1155_def: Interface;
export type transferArgs = {
fromAddress: string;
toAddress: string;
id: number | PrefixedHexString;
value: number | PrefixedHexString;
data?: Buffer | PrefixedHexString;
};
export type item = {
id: number | PrefixedHexString;
value: number | PrefixedHexString;
};
export type batchTransferArgs = {
fromAddress: string;
toAddress: string;
items: Array<item>;
data?: Buffer | PrefixedHexString;
};