openapi: 3.0.1 info: description: REST API for the Wasp node title: Wasp auth Transaction Builder API version: '0' servers: - url: / tags: - name: Transaction Builder description: Build unsigned transactions for transfers, staking, Move calls (unsafe_ prefix) paths: /unsafe_batchTransaction: post: operationId: unsafe_batchTransaction summary: unsafe_batchTransaction description: Create an unsigned batched transaction. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_batchTransaction description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_batchTransaction params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_mergeCoins: post: operationId: unsafe_mergeCoins summary: unsafe_mergeCoins description: Create an unsigned transaction to merge multiple coins into one coin. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_mergeCoins description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_mergeCoins params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_moveCall: post: operationId: unsafe_moveCall summary: unsafe_moveCall description: Create an unsigned transaction to execute a Move call on the network, by calling the specified function in the module of a given package. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_moveCall description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_moveCall params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_pay: post: operationId: unsafe_pay summary: unsafe_pay description: Send `Coin` to a list of addresses, where `T` can be any coin type, following a list of amounts, The object specified in the `gas` field will be used to pay the gas fee for the transaction. The gas object can not appear in `input_coins`. If the gas object is not specified, the RPC server will auto-select one. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_pay description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_pay params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_payAllIota: post: operationId: unsafe_payAllIota summary: unsafe_payAllIota description: 'Send all IOTA coins to one recipient. This is for IOTA coin only and does not require a separate gas coin object. Specifically, what pay_all_iota does are: 1. accumulate all IOTA from input coins and deposit all IOTA to the first input coin 2. transfer the updated first coin to the recipient and also use this first coin as gas coin object. 3. the balance of the first input coin after tx is sum(input_coins) - actual_gas_cost. 4. all other input coins other than the first are deleted.' tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_payAllIota description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_payAllIota params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_payIota: post: operationId: unsafe_payIota summary: unsafe_payIota description: 'Send IOTA coins to a list of addresses, following a list of amounts. This is for IOTA coin only and does not require a separate gas coin object. Specifically, what pay_iota does are: 1. debit each input_coin to create new coin following the order of amounts and assign it to the corresponding recipient. 2. accumulate all residual IOTA from input coins left and deposit all IOTA to the first input coin, then use the first input coin as the gas coin object. 3. the balance of the first input coin after tx is sum(input_coins) - sum(amounts) - actual_gas_cost 4. all other input coints other than the first one are deleted.' tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_payIota description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_payIota params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_publish: post: operationId: unsafe_publish summary: unsafe_publish description: Create an unsigned transaction to publish a Move package. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_publish description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_publish params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_requestAddStake: post: operationId: unsafe_requestAddStake summary: unsafe_requestAddStake description: Add stake to a validator's staking pool using multiple coins and amount. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_requestAddStake description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_requestAddStake params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_requestAddTimelockedStake: post: operationId: unsafe_requestAddTimelockedStake summary: unsafe_requestAddTimelockedStake description: Add timelocked stake to a validator's staking pool using multiple balances and amount. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_requestAddTimelockedStake description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_requestAddTimelockedStake params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_requestWithdrawStake: post: operationId: unsafe_requestWithdrawStake summary: unsafe_requestWithdrawStake description: Withdraw stake from a validator's staking pool. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_requestWithdrawStake description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_requestWithdrawStake params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_requestWithdrawTimelockedStake: post: operationId: unsafe_requestWithdrawTimelockedStake summary: unsafe_requestWithdrawTimelockedStake description: Withdraw timelocked stake from a validator's staking pool. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_requestWithdrawTimelockedStake description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_requestWithdrawTimelockedStake params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_splitCoin: post: operationId: unsafe_splitCoin summary: unsafe_splitCoin description: Create an unsigned transaction to split a coin object into multiple coins. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_splitCoin description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_splitCoin params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_splitCoinEqual: post: operationId: unsafe_splitCoinEqual summary: unsafe_splitCoinEqual description: Create an unsigned transaction to split a coin object into multiple equal-size coins. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_splitCoinEqual description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_splitCoinEqual params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_transferIota: post: operationId: unsafe_transferIota summary: unsafe_transferIota description: Create an unsigned transaction to send IOTA coin object to an IOTA address. The IOTA object is also used as the gas object. tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_transferIota description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_transferIota params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} /unsafe_transferObject: post: operationId: unsafe_transferObject summary: unsafe_transferObject description: Create an unsigned transaction to transfer an object from one address to another. The object's type must allow public transfers tags: - Transaction Builder requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - id - method properties: jsonrpc: type: string enum: - '2.0' description: JSON-RPC protocol version id: oneOf: - type: integer - type: string description: Request identifier method: type: string enum: - unsafe_transferObject description: The JSON-RPC method name params: type: array description: Method parameters items: {} example: jsonrpc: '2.0' id: 1 method: unsafe_transferObject params: [] responses: '200': description: Successful JSON-RPC response content: application/json: schema: type: object properties: jsonrpc: type: string example: '2.0' id: oneOf: - type: integer - type: string result: $ref: '#/components/schemas/TransactionBlockBytes' default: description: JSON-RPC error response content: application/json: schema: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string error: type: object properties: code: type: integer message: type: string data: {} components: securitySchemes: Authorization: description: JWT Token in: header name: Authorization type: apiKey externalDocs: description: Find out more about Wasp url: https://wiki.iota.org/smart-contracts/overview x-original-swagger-version: '2.0'