diff --git a/docs/runtime/transactions.md b/docs/runtime/transactions.md index 90a753b504..ce4ce169ec 100644 --- a/docs/runtime/transactions.md +++ b/docs/runtime/transactions.md @@ -10,6 +10,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. ## accounts ### accounts.Addresses (query) {#accounts-addresses} + [[Rust][rust-accounts.Addresses] | [Go][go-accounts.Addresses] | [TypeScript][typescript-accounts.Addresses]] #### Parameters [[Rust][rust-accounts.Addresses-params] | [Go][go-accounts.Addresses-params] | [TypeScript][typescript-accounts.Addresses-params]] @@ -24,6 +25,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-accounts.Addresses-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L111-L116 ### accounts.Balances (query) {#accounts-balances} + [[Rust][rust-accounts.Balances] | [Go][go-accounts.Balances] | [TypeScript][typescript-accounts.Balances]] #### Parameters [[Rust][rust-accounts.Balances-params] | [Go][go-accounts.Balances-params] | [TypeScript][typescript-accounts.Balances-params]] @@ -44,6 +46,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-accounts.Balances-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L80-L85 ### accounts.DenominationInfo (query) {#accounts-denominationinfo} + [[Rust][rust-accounts.DenominationInfo] | [Go][go-accounts.DenominationInfo] | [TypeScript][typescript-accounts.DenominationInfo]] #### Parameters [[Rust][rust-accounts.DenominationInfo-params] | [Go][go-accounts.DenominationInfo-params] | [TypeScript][typescript-accounts.DenominationInfo-params]] @@ -56,7 +59,6 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. Number of decimals that the denomination is using. - [rust-accounts.DenominationInfo]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/accounts/mod.rs#L745-L751 [go-accounts.DenominationInfo]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/accounts/accounts.go#L103-L111 [typescript-accounts.DenominationInfo]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/accounts.ts#L53-L57 @@ -67,6 +69,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-accounts.DenominationInfo-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L125-L130 ### accounts.Nonce (query) {#accounts-nonce} + [[Rust][rust-accounts.Nonce] | [Go][go-accounts.Nonce] | [TypeScript][typescript-accounts.Nonce]] #### Parameters [[Rust][rust-accounts.Nonce-params] | [Go][go-accounts.Nonce-params] | [TypeScript][typescript-accounts.Nonce-params]] @@ -81,6 +84,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-accounts.Nonce-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L104-L109 ### accounts.Transfer (call) {#accounts-transfer} + [[Rust][rust-accounts.Transfer] | [Go][go-accounts.Transfer] | [TypeScript][typescript-accounts.Transfer]] #### Parameters [[Rust][rust-accounts.Transfer-params] | [Go][go-accounts.Transfer-params] | [TypeScript][typescript-accounts.Transfer-params]] @@ -98,6 +102,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. ## consensus ### consensus.Account (query) {#consensus-account} + [[Rust][rust-consensus.Account] | [TypeScript][typescript-consensus.Account]] #### Parameters [[Rust][rust-consensus.Account-params] | [Go][go-consensus.Account-params] | [TypeScript][typescript-consensus.Account-params]] @@ -111,6 +116,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-consensus.Account-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L366-L371 ### consensus.Balance (query) {#consensus-balance} + [[Rust][rust-consensus.Balance] | [Go][go-consensus.Balance] | [TypeScript][typescript-consensus.Balance]] #### Parameters [[Rust][rust-consensus.Balance-params] | [Go][go-consensus.Balance-params] | [TypeScript][typescript-consensus.Balance-params]] @@ -131,6 +137,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-consensus.Balance-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L359-L364 ### consensus.Deposit (call) {#consensus-deposit} + [[Rust][rust-consensus.Deposit] | [Go][go-consensus.Deposit] | [TypeScript][typescript-consensus.Deposit]] #### Parameters [[Rust][rust-consensus.Deposit-params] | [Go][go-consensus.Deposit-params] | [TypeScript][typescript-consensus.Deposit-params]] @@ -146,6 +153,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-consensus.Deposit-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L336-L342 ### consensus.Withdraw (call) {#consensus-withdraw} + [[Rust][rust-consensus.Withdraw] | [Go][go-consensus.Withdraw] | [TypeScript][typescript-consensus.Withdraw]] #### Parameters [[Rust][rust-consensus.Withdraw-params] | [Go][go-consensus.Withdraw-params] | [TypeScript][typescript-consensus.Withdraw-params]] @@ -163,6 +171,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. ## contracts ### contracts.Call (call) {#contracts-call} + [[Rust][rust-contracts.Call] | [Go][go-contracts.Call] | [TypeScript][typescript-contracts.Call]] #### Parameters [[Rust][rust-contracts.Call-params] | [Go][go-contracts.Call-params] | [TypeScript][typescript-contracts.Call-params]] @@ -170,19 +179,15 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. - `id: InstanceId` Instance identifier. - - `data: Vec` Call arguments. - - `tokens: Vec` Tokens that should be sent to the contract as part of the call. - #### Result [[Go][go-contracts.Call-result]] - [rust-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/modules/contracts/src/lib.rs#L493-L536 [go-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/contracts.go#L144-L147 [typescript-contracts.Call]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/contracts.ts#L58-L60 @@ -192,6 +197,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [go-contracts.Call-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/types.go#L119-L120 ### contracts.Code (query) {#contracts-code} + [[Rust][rust-contracts.Code] | [Go][go-contracts.Code] | [TypeScript][typescript-contracts.Code]] #### Parameters [[Rust][rust-contracts.Code-params] | [Go][go-contracts.Code-params] | [TypeScript][typescript-contracts.Code-params]] @@ -200,30 +206,24 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. Code identifier. - #### Result [[Rust][rust-contracts.Code-result] | [TypeScript][typescript-contracts.Code-result]] - `id: CodeId` Unique code identifier. - - `hash: Hash` Code hash. - - `abi: ABI` ABI. - - `uploader: Address` Code uploader address. - - `instantiate_policy: Policy` Who is allowed to instantiate this code. - [rust-contracts.Code]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/modules/contracts/src/lib.rs#L607-L613 [go-contracts.Code]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/contracts.go#L164-L172 [typescript-contracts.Code]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/contracts.ts#L64-L66 @@ -234,6 +234,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-contracts.Code-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L584-L608 ### contracts.Custom (query) {#contracts-custom} + [[Rust][rust-contracts.Custom] | [Go][go-contracts.Custom] | [TypeScript][typescript-contracts.Custom]] #### Parameters [[Rust][rust-contracts.Custom-params] | [Go][go-contracts.Custom-params] | [TypeScript][typescript-contracts.Custom-params]] @@ -241,15 +242,12 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. - `id: InstanceId` Instance identifier. - - `data: Vec` Query arguments. - #### Result [[Go][go-contracts.Custom-result]] - [rust-contracts.Custom]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/modules/contracts/src/lib.rs#L645-L680 [go-contracts.Custom]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/contracts.go#L214-L224 [typescript-contracts.Custom]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/contracts.ts#L81-L83 @@ -259,6 +257,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [go-contracts.Custom-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/types.go#L194-L195 ### contracts.Instance (query) {#contracts-instance} + [[Rust][rust-contracts.Instance] | [Go][go-contracts.Instance] | [TypeScript][typescript-contracts.Instance]] #### Parameters [[Rust][rust-contracts.Instance-params] | [Go][go-contracts.Instance-params] | [TypeScript][typescript-contracts.Instance-params]] @@ -267,26 +266,21 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. Instance identifier. - #### Result [[Rust][rust-contracts.Instance-result] | [TypeScript][typescript-contracts.Instance-result]] - `id: InstanceId` Unique instance identifier. - - `code_id: CodeId` Identifier of code used by the instance. - - `creator: Address` Instance creator address. - - `upgrades_policy: Policy` Who is allowed to upgrade this instance. - [rust-contracts.Instance]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/modules/contracts/src/lib.rs#L615-L621 [go-contracts.Instance]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/contracts.go#L174-L182 [typescript-contracts.Instance]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/contracts.ts#L67-L69 @@ -297,6 +291,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-contracts.Instance-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L620-L640 ### contracts.InstanceStorage (query) {#contracts-instancestorage} + [[Rust][rust-contracts.InstanceStorage] | [Go][go-contracts.InstanceStorage] | [TypeScript][typescript-contracts.InstanceStorage]] #### Parameters [[Rust][rust-contracts.InstanceStorage-params] | [Go][go-contracts.InstanceStorage-params]] @@ -304,19 +299,16 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. - `id: InstanceId` Instance identifier. - - `key: Vec` Storage key. - #### Result [[Rust][rust-contracts.InstanceStorage-result] | [Go][go-contracts.InstanceStorage-result]] - `value: Option>` Storage value or `None` if key doesn't exist. - [rust-contracts.InstanceStorage]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/modules/contracts/src/lib.rs#L623-L635 [go-contracts.InstanceStorage]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/contracts.go#L184-L192 [typescript-contracts.InstanceStorage]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/contracts.ts#L70-L75 @@ -326,6 +318,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [go-contracts.InstanceStorage-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/types.go#L154-L158 ### contracts.Instantiate (call) {#contracts-instantiate} + [[Rust][rust-contracts.Instantiate] | [Go][go-contracts.Instantiate] | [TypeScript][typescript-contracts.Instantiate]] #### Parameters [[Rust][rust-contracts.Instantiate-params] | [Go][go-contracts.Instantiate-params] | [TypeScript][typescript-contracts.Instantiate-params]] @@ -333,27 +326,22 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. - `code_id: CodeId` Identifier of code used by the instance. - - `upgrades_policy: Policy` Who is allowed to upgrade this instance. - - `data: Vec` Arguments to contract's instantiation function. - - `tokens: Vec` Tokens that should be sent to the contract as part of the instantiate call. - #### Result [[Rust][rust-contracts.Instantiate-result] | [Go][go-contracts.Instantiate-result] | [TypeScript][typescript-contracts.Instantiate-result]] - `id: InstanceId` Assigned instance identifier. - [rust-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/modules/contracts/src/lib.rs#L431-L491 [go-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/contracts.go#L130-L133 [typescript-contracts.Instantiate]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/contracts.ts#L53-L57 @@ -365,6 +353,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-contracts.Instantiate-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L524-L532 ### contracts.PublicKey (query) {#contracts-publickey} + [[Rust][rust-contracts.PublicKey] | [Go][go-contracts.PublicKey] | [TypeScript][typescript-contracts.PublicKey]] #### Parameters [[Rust][rust-contracts.PublicKey-params] | [Go][go-contracts.PublicKey-params] | [TypeScript][typescript-contracts.PublicKey-params]] @@ -372,27 +361,22 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. - `id: InstanceId` Instance identifier. - - `kind: PublicKeyKind` Kind of public key. - #### Result [[Rust][rust-contracts.PublicKey-result] | [Go][go-contracts.PublicKey-result] | [TypeScript][typescript-contracts.PublicKey-result]] - `key: Vec` Public key. - - `checksum: Vec` Checksum of the key manager state. - - `signature: Vec` Sign(sk, (key || checksum)) from the key manager. - [rust-contracts.PublicKey]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/modules/contracts/src/lib.rs#L637-L643 [go-contracts.PublicKey]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/contracts.go#L194-L202 [typescript-contracts.PublicKey]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/contracts.ts#L76-L80 @@ -404,6 +388,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-contracts.PublicKey-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L677-L693 ### contracts.Upgrade (call) {#contracts-upgrade} + [[Rust][rust-contracts.Upgrade] | [Go][go-contracts.Upgrade] | [TypeScript][typescript-contracts.Upgrade]] #### Parameters [[Rust][rust-contracts.Upgrade-params] | [Go][go-contracts.Upgrade-params] | [TypeScript][typescript-contracts.Upgrade-params]] @@ -411,20 +396,16 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. - `id: InstanceId` Instance identifier. - - `code_id: CodeId` Updated code identifier. - - `data: Vec` Arguments to contract's upgrade function. - - `tokens: Vec` Tokens that should be sent to the contract as part of the call. - [rust-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/modules/contracts/src/lib.rs#L538-L605 [go-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/contracts.go#L159-L162 [typescript-contracts.Upgrade]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/contracts.ts#L61-L63 @@ -433,6 +414,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-contracts.Upgrade-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L552-L572 ### contracts.Upload (call) {#contracts-upload} + [[Rust][rust-contracts.Upload] | [Go][go-contracts.Upload] | [TypeScript][typescript-contracts.Upload]] #### Parameters [[Rust][rust-contracts.Upload-params] | [Go][go-contracts.Upload-params] | [TypeScript][typescript-contracts.Upload-params]] @@ -440,23 +422,19 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. - `abi: ABI` ABI. - - `instantiate_policy: Policy` Who is allowed to instantiate this code. - - `code: Vec` Compiled contract code. - #### Result [[Rust][rust-contracts.Upload-result] | [Go][go-contracts.Upload-result] | [TypeScript][typescript-contracts.Upload-result]] - `id: CodeId` Assigned code identifier. - [rust-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/modules/contracts/src/lib.rs#L339-L429 [go-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/contracts/contracts.go#L111-L118 [typescript-contracts.Upload]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/contracts.ts#L50-L52 @@ -470,6 +448,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. ## core ### core.CallDataPublicKey (query) {#core-calldatapublickey} + [[Rust][rust-core.CallDataPublicKey] | [TypeScript][typescript-core.CallDataPublicKey]] #### Parameters [[Rust][rust-core.CallDataPublicKey-params]] @@ -478,14 +457,12 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. Public key used for deriving the shared secret for encrypting call data. - #### Result [[Rust][rust-core.CallDataPublicKey-result] | [TypeScript][typescript-core.CallDataPublicKey-result]] - `public_key: SignedPublicKey` Public key used for deriving the shared secret for encrypting call data. - [rust-core.CallDataPublicKey]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/core/mod.rs#L438-L453 [typescript-core.CallDataPublicKey]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/core.ts#L61-L65 [rust-core.CallDataPublicKey-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/core/types.rs#L29-L34 @@ -493,6 +470,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-core.CallDataPublicKey-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L11-L19 ### core.CheckInvariants (query) {#core-checkinvariants} + [[Rust][rust-core.CheckInvariants] | [TypeScript][typescript-core.CheckInvariants]] #### Parameters [[Rust][rust-core.CheckInvariants-params]] @@ -501,20 +479,19 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. Public key used for deriving the shared secret for encrypting call data. - #### Result [[Rust][rust-core.CheckInvariants-result]] - `public_key: SignedPublicKey` Public key used for deriving the shared secret for encrypting call data. - [rust-core.CheckInvariants]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/core/mod.rs#L428-L436 [typescript-core.CheckInvariants]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/core.ts#L57-L59 [rust-core.CheckInvariants-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/core/types.rs#L29-L34 [rust-core.CheckInvariants-result]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/core/types.rs#L29-L34 ### core.EstimateGas (query) {#core-estimategas} + [[Rust][rust-core.EstimateGas] | [Go][go-core.EstimateGas] | [TypeScript][typescript-core.EstimateGas]] #### Parameters [[Rust][rust-core.EstimateGas-params] | [Go][go-core.EstimateGas-params] | [TypeScript][typescript-core.EstimateGas-params]] @@ -524,7 +501,6 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. The unsigned transaction to estimate. - [rust-core.EstimateGas]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/core/mod.rs#L348-L426 [go-core.EstimateGas]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/core/core.go#L57-L65 [typescript-core.EstimateGas]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/core.ts#L53-L55 @@ -533,6 +509,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-core.EstimateGas-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L3-L9 ### core.MinGasPrice (query) {#core-mingasprice} + [[Rust][rust-core.MinGasPrice] | [Go][go-core.MinGasPrice] | [TypeScript][typescript-core.MinGasPrice]] #### Parameters [[Rust][rust-core.MinGasPrice-params]] @@ -541,13 +518,13 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. A set of state versions for all supported modules. - [rust-core.MinGasPrice]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/core/mod.rs#L455-L473 [go-core.MinGasPrice]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/core/core.go#L81-L89 [typescript-core.MinGasPrice]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/core.ts#L67-L69 [rust-core.MinGasPrice-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/core/types.rs#L11-L16 ### core.RuntimeInfo (query) {#core-runtimeinfo} + [[Rust][rust-core.RuntimeInfo] | [Go][go-core.RuntimeInfo] | [TypeScript][typescript-core.RuntimeInfo]] #### Parameters [[Rust][rust-core.RuntimeInfo-params]] @@ -556,10 +533,8 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. A set of state versions for all supported modules. - #### Result [[TypeScript][typescript-core.RuntimeInfo-result]] - [rust-core.RuntimeInfo]: https://github.com/oasisprotocol/oasis-sdk/tree/master/runtime-sdk/src/modules/core/mod.rs#L475-L486 [go-core.RuntimeInfo]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/go/modules/core/core.go#L141-L149 [typescript-core.RuntimeInfo]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/core.ts#L71-L73 @@ -569,6 +544,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. ## evm ### evm.Balance (query) {#evm-balance} + [[Rust][rust-evm.Balance] | [Go][go-evm.Balance] | [TypeScript][typescript-evm.Balance]] #### Parameters [[Rust][rust-evm.Balance-params] | [Go][go-evm.Balance-params] | [TypeScript][typescript-evm.Balance-params]] @@ -583,6 +559,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-evm.Balance-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L426-L431 ### evm.Call (call) {#evm-call} + [[Rust][rust-evm.Call] | [Go][go-evm.Call] | [TypeScript][typescript-evm.Call]] #### Parameters [[Rust][rust-evm.Call-params] | [Go][go-evm.Call-params] | [TypeScript][typescript-evm.Call-params]] @@ -599,6 +576,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-evm.Call-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L402-L409 ### evm.Code (query) {#evm-code} + [[Rust][rust-evm.Code] | [Go][go-evm.Code] | [TypeScript][typescript-evm.Code]] #### Parameters [[Rust][rust-evm.Code-params] | [Go][go-evm.Code-params] | [TypeScript][typescript-evm.Code-params]] @@ -613,6 +591,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-evm.Code-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L419-L424 ### evm.Create (call) {#evm-create} + [[Rust][rust-evm.Create] | [Go][go-evm.Create] | [TypeScript][typescript-evm.Create]] #### Parameters [[Rust][rust-evm.Create-params] | [Go][go-evm.Create-params] | [TypeScript][typescript-evm.Create-params]] @@ -628,6 +607,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-evm.Create-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L394-L400 ### evm.SimulateCall (query) {#evm-simulatecall} + [[Rust][rust-evm.SimulateCall] | [Go][go-evm.SimulateCall] | [TypeScript][typescript-evm.SimulateCall]] #### Parameters [[Rust][rust-evm.SimulateCall-params] | [Go][go-evm.SimulateCall-params] | [TypeScript][typescript-evm.SimulateCall-params]] @@ -647,6 +627,7 @@ with references to Go, Rust and TypeScript bindings in Oasis SDK. [typescript-evm.SimulateCall-params]: https://github.com/oasisprotocol/oasis-sdk/tree/master/client-sdk/ts-web/rt/src/types.ts#L433-L443 ### evm.Storage (query) {#evm-storage} + [[Rust][rust-evm.Storage] | [Go][go-evm.Storage] | [TypeScript][typescript-evm.Storage]] #### Parameters [[Rust][rust-evm.Storage-params] | [Go][go-evm.Storage-params] | [TypeScript][typescript-evm.Storage-params]] diff --git a/tools/extract-runtime-txs/main.go b/tools/extract-runtime-txs/main.go index 114f6af863..156bac1a31 100644 --- a/tools/extract-runtime-txs/main.go +++ b/tools/extract-runtime-txs/main.go @@ -29,11 +29,15 @@ var ( scriptName = filepath.Base(os.Args[0]) rootCmd = &cobra.Command{ - Use: scriptName, - Short: "Extracts Runtime transactions from formatted Rust, Go and TypeScript code.", - Long: "See README.md for details.", - Example: "./extract-runtime-txs --codebase.path ../.. --markdown", - Run: doExtractRuntimeTxs, + Use: scriptName, + Short: "Extracts Runtime transactions from formatted Rust, Go and TypeScript code.", + Example: `./extract-runtime-txs \ + --codebase.path ../.. \ + --markdown \ + --markdown.template.file ../../docs/runtime/transactions.md.tpl \ + --codebase.url https://github.com/oasisprotocol/oasis-sdk/tree/master/ \ + > ../../docs/runtime/transactions.md`, + Run: doExtractRuntimeTxs, } ) @@ -76,11 +80,11 @@ func markdownRef(fullName string, snippets map[types.Lang]types.Snippet, t types // markdownParams generates a markdown list of parameter or results fields of the transaction. func markdownParams(params []types.Parameter) string { - paramsStr := "\n" + paramsStr := "" for _, p := range params { paramsStr += fmt.Sprintf("- `%s: %s`\n", p.Name, p.Type) if p.Description != "" { - paramsStr += fmt.Sprintf("\n %s\n\n", p.Description) + paramsStr += fmt.Sprintf("\n %s\n", p.Description) } } return paramsStr @@ -132,12 +136,15 @@ func printMarkdown(transactions map[string]types.Tx) { markdown += fmt.Sprintf("## %s\n\n", tx.Module) lastModule = tx.Module } - markdown += fmt.Sprintf("### %s (%s) {#%s}\n", tx.FullName(), tx.Type, tx.Module+"-"+strings.ToLower(tx.Name)) + markdown += fmt.Sprintf("### %s (%s) {#%s}\n\n", tx.FullName(), tx.Type, tx.Module+"-"+strings.ToLower(tx.Name)) markdown += fmt.Sprintf("%s\n\n", markdownRef(tx.FullName(), tx.Ref, types.Base)) - markdown += fmt.Sprintf("#### Parameters %s\n%s\n", markdownRef(tx.FullName(), tx.ParametersRef, types.Params), markdownParams(tx.Parameters)) + markdown += fmt.Sprintf("#### Parameters %s\n\n%s\n", markdownRef(tx.FullName(), tx.ParametersRef, types.Params), markdownParams(tx.Parameters)) - if tx.Result != nil || len(tx.ResultRef) > 0 { - markdown += fmt.Sprintf("#### Result %s\n%s\n", markdownRef(tx.FullName(), tx.ResultRef, types.Result), markdownParams(tx.Result)) + if len(tx.ResultRef) > 0 { + markdown += fmt.Sprintf("#### Result %s\n\n", markdownRef(tx.FullName(), tx.ResultRef, types.Result)) + if tx.Result != nil { + markdown += fmt.Sprintf("%s\n", markdownParams(tx.Result)) + } } markdown += markdownRefSrcs(tx.FullName(), tx.Ref, types.Base)