UNPKG

9.38 kBTypeScriptView Raw
1export declare const wavesDocs = "\n\n/**\n * Creates signed issue transaction.\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function issue(txParams: {\n /** \n * Name of asset, max 16 symbols \n */\n name: string,\n /** \n * Description of asset, max 1000 symbols \n */\n description: string,\n /** \n * How many decimals your asset will have, range 0-8\n */\n decimals: number,\n /** \n * The total supply of your token\n */\n quantity: number,\n /** \n * Re-issuable defines if an asset issuer can increase the token's supply at a later point or not\n */\n reissuable: boolean,\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: 100000000\n */\n fee?: number,\n /** \n * Transaction version, default: 2\n */\n version?: number,\n /** \n * Network byte, default env.CHAIN_ID\n */\n chainId?: string\n}, seed?: string)\n\n/**\n * Creates signed reissue transaction.\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function reissue(txParams: {\n /** \n * Id of earlier issued asset\n */\n assetId: string,\n /** \n * The total supply of your token (will be added to the old one)\n */\n quantity: number,\n /** \n * Re-issuable defines if an asset issuer can increase the token's supply at a later point or not\n */\n reissuable: boolean,\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: 100000000\n */\n fee?: number,\n /** \n * version - Transaction version, default: 2\n */\n version?: number\n /** \n * Network byte, default env.CHAIN_ID\n */\n chainId?: string\n}, seed?: string)\n\n/**\n * Creates signed burn transaction.\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function burn(txParams: {\n /** \n * Id of earlier issued asset\n */\n assetId: string,\n /** \n * Amount to burn\n */\n quantity: number,\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: 100000\n */\n fee?: number,\n /** \n * version - Transaction version, default: 1\n */\n version?: number\n}, seed?: string) \n\n/**\n * Creates signed transfer transaction.\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function transfer(txParams: {\n /** \n * Amount to transfer in minimal units. E.x. for waves 100000000 equals 1.0 Waves\n */\n amount: number,\n /** \n * Recipient address to transfer funds to\n */\n recipient: string,\n /** \n * Asset Id to transfer, in case you want to transfer WAVES use default, default: ''\n */\n assetId?: string,\n /** \n * Attachment to transfer, default: ''\n */\n attachment?: string = '',\n /** \n * Asset Id to pay fee with, in case you want to pay fee with WAVES use default, default: ''\n */\n feeAssetId?: string = 'WAVES',\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: 100000.\n */\n fee?: number = 100000,\n /** \n * Transaction version, default: 1\n */\n version?: number = 1\n}, seed?: string) \n \n/**\n * Creates signed lease transaction.\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function lease(txParams: {\n /** \n * Amount to lease\n */\n amount: number,\n /** \n * Recipient address to lease to\n */\n recipient: string,\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: 200000.\n */\n fee?: number = 200000,\n /** \n * Transaction version, default: 1.\n */\n version?: number = 1\n}, seed: string = env.SEED)\n\n/**\n * Creates signed cancelLease transaction.\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function cancelLease(txParams: {\n /** \n * Id of previous lease transaction\n */\n leaseId: string,\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: 100000\n */\n fee?: number,\n /** \n * Network byte, default env.CHAIN_ID\n */\n chainId?: string\n}, seed: string = env.SEED) \n\n/**\n * Creates signed createAlias transaction. Not implemented\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function alias(txParams:{\n /** \n * Alias for a sender's address.\n */\n alias: string,\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: 100000\n */\n fee?: number,\n /** \n * Network byte, default env.CHAIN_ID\n */\n chainId?: string\n}, seed: string = env.SEED ) \n\n/**\n * Creates signed massTransfer transaction.\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function massTransfer(txParams: {\n /** \n *Array of objects representing transfer. Contains recipient and amount field\n */\n transfers: {recipient: string, amount:number}[],\n /** \n * Asset Id to transfer, in case you want to transfer WAVES use default, default: ''\n */\n assetId: string = 'WAVES',\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: 100000 + 50000 * (transfers.length + 1)\n */\n fee?: number = 100000 + 50000 * (transfers.length + 1),\n /** \n * Transaction version, default: 1\n */\n version?: number = 1\n }, seed: string = env.SEED)\n\n/**\n * Creates signed setScript transaction.\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function setScript(txParams: {\n /** \n * Compiled script in base64 format\n */\n script: string,\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: 1000000\n */\n fee?: number = 1000000,\n /** \n * Transaction version, default: 1\n */\n version?: number = 1,\n /** \n * Network byte, default env.CHAIN_ID\n */\n chainId?: string\n}, seed: string = env.SEED)\n\n\n\n/**\n * Creates signed data transaction.\n * @param {Object} txParams - Transaction parameters\n * @param {string} seed - Seed to sign transaction, default: env.SEED.\n */\ndeclare function data(txParams: {\n /** \n * Array of data entries: {key:string, value: string | number | boolean | Buffer | Uint8Array | number[]}\n */\n data: [],\n /** \n * Account public key from which this tx should be sent. Default to the one who signs tx\n */\n senderPublicKey?: string,\n /** \n * Transaction fee, default: Math.floor(1 + (bytes.length + 8 - 1) / 1024) * 100000)\n */\n fee?: number,\n /** \n * Transaction version, default: 1\n */\n version?: number = 1,\n}, seed: string = env.SEED)\n\n\n/**\n * Sends transaction to the Waves network using env.API_BASE endpoint.\n * @param {any} tx - Transaction to send to the network.\n */\ndeclare function broadcast(tx: any)\n\n/**\n * Generates keyPair from seed.\n * @param {string} seed - Seed used to generate keyPair, default: env.SEED.\n */\ndeclare function keyPair(seed: string = env.SEED): KeyPair\n\n/**\n * Generates publicKey from seed.\n * @param {string} seed - Seed used to generate publicKey, default: env.SEED.\n */\ndeclare function publicKey(seed: string = env.SEED): string\n\n/**\n * Generates privateKey from seed.\n * @param {string} seed - Seed used to generate privateKey, default: env.SEED.\n */\ndeclare function privateKey(seed: string = env.SEED): string\n\n/**\n * Generates address from KeyPair or Seed.\n * @param {string} keyPairOrSeed - KeyPair or Seed used to generate address, default: env.SEED.\n */\ndeclare function address(keyPairOrSeed: KeyPair | string = env.SEED)\n\ndeclare const env: {\n SEED: string,\n API_BASE: string,\n CHAIN_ID: string\n}\n\n/**\n * Open editor tab content\n */\ndeclare function contract(): string\n\n/**\n * Gets editor contents for tab.\n * @param {string} tabName - Name of the tab to get content from.\n */\ndeclare function file(tabName:string):string\n\n/**\n * Gets editor contents for tab.\n * @param {string} code - Contract code\n */\ndeclare function compile(code:string):string\n\n";