# Faucet

Faucet Api

## Faucet transaction (v1)

> Get information about a faucet transaction by its hash.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"59f32573d4ca6e9e0f8e04896600ea56ff9fd0bc"},"tags":[{"name":"Faucet","description":"Faucet Api"}],"servers":[{"url":"https://rpc-testnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-wallet-testnet.supra.com","description":"RPC For Wallet"},{"url":"https://rpc-suprascan-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-archive-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-suprascan-reprocessing-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-testnet1.supra.com","description":"RPC For nodeops group1"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v1/wallet/faucet/transactions/{hash}":{"get":{"tags":["Faucet"],"summary":"Faucet transaction (v1)","description":"Get information about a faucet transaction by its hash.","operationId":"faucet_transaction_by_hash_v1","parameters":[{"name":"hash","in":"path","description":"Hash of the faucet transaction to lookup","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Faucet transaction data of the given transaction hash","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TransactionInfoV1"}]}}}}},"deprecated":true}}},"components":{"schemas":{"TransactionInfoV1":{"type":"object","description":"Information about a Supra transaction.","required":["authenticator","hash","header","payload","status"],"properties":{"authenticator":{"type":"object","description":"The cryptographic material that was submitted with the transaction, according to its type."},"block_header":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TransactionBlockInfo","description":"Metadata about the block containing the transaction, if any. This field should\nnot be set if this [TransactionInfoV1] is yet to be included in a [Block]."}]},"hash":{"$ref":"#/components/schemas/Hash"},"header":{"$ref":"#/components/schemas/SmrTransactionHeader"},"payload":{"type":"object","description":"The deserialized payload of the transaction according to its type."},"output":{"oneOf":[{"$ref":"#/components/schemas/TransactionOutput"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/TxExecutionStatus"}}},"TransactionBlockInfo":{"type":"object","description":"Metadata about the block that finalized a particular [SmrTransaction].","required":["hash","height","timestamp"],"properties":{"hash":{"$ref":"#/components/schemas/Hash"},"height":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The height of the related block."},"timestamp":{"$ref":"#/components/schemas/SmrTimestamp"}},"deprecated":true},"Hash":{"type":"string","description":"Hex encoded hash"},"SmrTimestamp":{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"integer","format":"u-int64","description":"The timestamp as measured in the number of microseconds since the unix epoch.","minimum":0}}},"SmrTransactionHeader":{"type":"object","required":["chain_id","expiration_timestamp","sender","sequence_number","gas_unit_price","max_gas_amount"],"properties":{"chain_id":{"type":"integer","format":"uint8","description":"The unique identifier for the instance of the Supra chain that this transaction should\nbe executed upon.","minimum":0},"expiration_timestamp":{"$ref":"#/components/schemas/SmrTimestamp","description":"The time at which this transaction should be discarded if it has not been executed."},"sender":{"$ref":"#/components/schemas/AccountAddress","description":"The standardized representation of the sender's account address in the target VM."},"sequence_number":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The sequence number of the sender's account in the target VM."},"gas_unit_price":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The amount of Supra that the sender is willing to pay per unit of gas."},"max_gas_amount":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The maximum amount of gas that the sender is willing to spend."}}},"AccountAddress":{"type":"string","description":"Hex encoded account address."},"TransactionOutput":{"oneOf":[{"type":"object","required":["Dkg"],"properties":{"Dkg":{"$ref":"#/components/schemas/TxExecutionStatus"}}},{"type":"string","enum":["Empty"]},{"type":"object","required":["Move"],"properties":{"Move":{"$ref":"#/components/schemas/MoveTransactionOutput"}}},{"type":"object","required":["Oracle"],"properties":{"Oracle":{"$ref":"#/components/schemas/TxExecutionStatus"}}}],"description":"[crate::api::v1::TransactionOutput] with all fields in human-readable format."},"TxExecutionStatus":{"type":"string","enum":["Success","Fail","Invalid","PendingAfterExecution","Pending"]},"MoveTransactionOutput":{"type":"object","description":"The execution output of a Move transaction.","required":["gas_used","events","vm_status"],"properties":{"gas_used":{"type":"integer","format":"u-int64","description":"The gas used by the transaction.","minimum":0},"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"vm_status":{"type":"string","description":"A message summarizing the execution result produced by the MoveVM."}}},"Event":{"type":"object","description":"On-chain event.","required":["guid","sequence_number","type","data"],"properties":{"guid":{"type":"string","description":"The globally unique identifier of this event stream."},"sequence_number":{"type":"integer","format":"u-int64","minimum":0},"type":{"type":"string","description":"The `MoveType` of the event"},"data":{"description":"The JSON representation of the event"}}}}}}
```

## Faucet (v1)

> funds account with \[FUND\_AMOUNT] coins

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"59f32573d4ca6e9e0f8e04896600ea56ff9fd0bc"},"tags":[{"name":"Faucet","description":"Faucet Api"}],"servers":[{"url":"https://rpc-testnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-wallet-testnet.supra.com","description":"RPC For Wallet"},{"url":"https://rpc-suprascan-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-archive-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-suprascan-reprocessing-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-testnet1.supra.com","description":"RPC For nodeops group1"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v1/wallet/faucet/{address}":{"get":{"tags":["Faucet"],"summary":"Faucet (v1)","description":"funds account with [FUND_AMOUNT] coins","operationId":"faucet_v1","parameters":[{"name":"address","in":"path","description":"Address of account with or without a 0x prefix","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"list of associated transactions created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaucetStatus"}}}}}}}},"components":{"schemas":{"FaucetStatus":{"oneOf":[{"type":"object","required":["Accepted"],"properties":{"Accepted":{"$ref":"#/components/schemas/Hash"}}},{"type":"string","enum":["TryLater"]}]},"Hash":{"type":"string","description":"Hex encoded hash"}}}}
```

## Faucet transaction (v2)

> Get information about a faucet transaction by its hash.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"59f32573d4ca6e9e0f8e04896600ea56ff9fd0bc"},"tags":[{"name":"Faucet","description":"Faucet Api"}],"servers":[{"url":"https://rpc-testnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-wallet-testnet.supra.com","description":"RPC For Wallet"},{"url":"https://rpc-suprascan-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-archive-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-suprascan-reprocessing-testnet.supra.com","description":"RPC For Suprascan"},{"url":"https://rpc-testnet1.supra.com","description":"RPC For nodeops group1"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v2/wallet/faucet/transactions/{hash}":{"get":{"tags":["Faucet"],"summary":"Faucet transaction (v2)","description":"Get information about a faucet transaction by its hash.","operationId":"faucet_v2","parameters":[{"name":"hash","in":"path","description":"Hash of the faucet transaction to lookup","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Faucet transaction data of the given transaction hash","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionInfoV2"}}}}}}}},"components":{"schemas":{"TransactionInfoV2":{"type":"object","description":"Information about a Supra transaction.","required":["authenticator","hash","header","payload","status"],"properties":{"authenticator":{"type":"object","description":"The cryptographic material that was submitted with the transaction, according to its type."},"block_header":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BlockHeaderInfo","description":"Metadata about the block containing the transaction, if any. This field should\nnot be set if this [TransactionInfoV2] is yet to be included in a [Block]."}]},"hash":{"$ref":"#/components/schemas/Hash"},"header":{"$ref":"#/components/schemas/SmrTransactionHeader"},"payload":{"type":"object","description":"The deserialized payload of the transaction according to its type."},"output":{"oneOf":[{"$ref":"#/components/schemas/TransactionOutput"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/TxExecutionStatus"}}},"BlockHeaderInfo":{"type":"object","description":"Metadata about a Supra block.","required":["author","hash","height","parent","timestamp","view"],"properties":{"author":{"$ref":"#/components/schemas/Identity"},"hash":{"$ref":"#/components/schemas/Hash"},"height":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Number of blocks before this block in the chain (including the genesis block)."},"parent":{"$ref":"#/components/schemas/Hash"},"timestamp":{"$ref":"#/components/schemas/SmrTimestamp"},"view":{"$ref":"#/components/schemas/View"}}},"Identity":{"type":"string","description":"Hex encoded identity."},"Hash":{"type":"string","description":"Hex encoded hash"},"SmrTimestamp":{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"integer","format":"u-int64","description":"The timestamp as measured in the number of microseconds since the unix epoch.","minimum":0}}},"View":{"type":"object","required":["epoch_id","round"],"properties":{"epoch_id":{"$ref":"#/components/schemas/EpochId","description":"Identifier of the consensus epoch."},"round":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the consensus round."}}},"EpochId":{"type":"object","required":["chain_id","epoch"],"properties":{"chain_id":{"oneOf":[{"type":"integer","format":"u-int8","minimum":0}],"description":"Unique identifier for this instance of the SMR."},"epoch":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the epoch within the context of `chain_id`."}}},"SmrTransactionHeader":{"type":"object","required":["chain_id","expiration_timestamp","sender","sequence_number","gas_unit_price","max_gas_amount"],"properties":{"chain_id":{"type":"integer","format":"uint8","description":"The unique identifier for the instance of the Supra chain that this transaction should\nbe executed upon.","minimum":0},"expiration_timestamp":{"$ref":"#/components/schemas/SmrTimestamp","description":"The time at which this transaction should be discarded if it has not been executed."},"sender":{"$ref":"#/components/schemas/AccountAddress","description":"The standardized representation of the sender's account address in the target VM."},"sequence_number":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The sequence number of the sender's account in the target VM."},"gas_unit_price":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The amount of Supra that the sender is willing to pay per unit of gas."},"max_gas_amount":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The maximum amount of gas that the sender is willing to spend."}}},"AccountAddress":{"type":"string","description":"Hex encoded account address."},"TransactionOutput":{"oneOf":[{"type":"object","required":["Dkg"],"properties":{"Dkg":{"$ref":"#/components/schemas/TxExecutionStatus"}}},{"type":"string","enum":["Empty"]},{"type":"object","required":["Move"],"properties":{"Move":{"$ref":"#/components/schemas/MoveTransactionOutput"}}},{"type":"object","required":["Oracle"],"properties":{"Oracle":{"$ref":"#/components/schemas/TxExecutionStatus"}}}],"description":"[crate::api::v1::TransactionOutput] with all fields in human-readable format."},"TxExecutionStatus":{"type":"string","enum":["Success","Fail","Invalid","PendingAfterExecution","Pending"]},"MoveTransactionOutput":{"type":"object","description":"The execution output of a Move transaction.","required":["gas_used","events","vm_status"],"properties":{"gas_used":{"type":"integer","format":"u-int64","description":"The gas used by the transaction.","minimum":0},"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"vm_status":{"type":"string","description":"A message summarizing the execution result produced by the MoveVM."}}},"Event":{"type":"object","description":"On-chain event.","required":["guid","sequence_number","type","data"],"properties":{"guid":{"type":"string","description":"The globally unique identifier of this event stream."},"sequence_number":{"type":"integer","format":"u-int64","minimum":0},"type":{"type":"string","description":"The `MoveType` of the event"},"data":{"description":"The JSON representation of the event"}}}}}}
```
