@interlay/interbtc-types
Advanced tools
Comparing version 0.12.5 to 0.30.0
@@ -1,1 +0,1 @@ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var a=t();for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(this,(function(){return(()=>{"use strict";var e={d:(t,a)=>{for(var r in a)e.o(a,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:a[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};return((e,t,a)=>{a.r(t),a.d(t,{default:()=>r});const r=JSON.parse('{"types":[{"minmax":[0,100],"types":{"H256Le":"H256","Value":"i64","Collateral":"Balance","Wrapped":"Balance","UnsignedInner":"u128","StatusCode":{"_enum":["Running","Error","Shutdown"]},"Address":"AccountId","LookupSource":"AccountId","Status":"StatusCode","ErrorCode":{"_enum":["None","OracleOffline"]},"VaultStatus":{"_enum":{"Active":"bool","Liquidated":"()","CommittedTheft":"()"}},"RawBlockHeader":{"0":"[u8; 80]"},"LockIdentifier":"[u8; 8]","RichBlockHeader":{"block_header":"BlockHeader","block_height":"u32","chain_id":"u32","para_height":"BlockNumber"},"AccountData":{"free":"Balance","reserved":"Balance","frozen":"Balance"},"OrmlAccountData":{"free":"Balance","reserved":"Balance","frozen":"Balance"},"OrmlBalanceLock":{"amount":"Balance","id":"LockIdentifier"},"BlockHeader":{"merkle_root":"H256Le","target":"U256","timestamp":"u32","version":"i32","hash":"H256Le","hash_prev_block":"H256Le","nonce":"u32"},"BlockChain":{"chain_id":"u32","start_height":"u32","max_height":"u32"},"BtcAddress":{"_enum":{"P2PKH":"H160","P2SH":"H160","P2WPKHv0":"H160","P2WSHv0":"H256"}},"BtcPublicKey":"[u8; 33]","Wallet":{"addresses":"BTreeSet<BtcAddress>","public_key":"BtcPublicKey"},"Vault":{"id":"AccountId","wallet":"Wallet","status":"VaultStatus","banned_until":"Option<BlockNumber>","to_be_issued_tokens":"Wrapped","issued_tokens":"Wrapped","to_be_redeemed_tokens":"Wrapped","to_be_replaced_tokens":"Wrapped","replace_collateral":"Collateral","liquidated_collateral":"Collateral","currency_id":"CurrencyId"},"DefaultVault":"Vault","IssueRequestStatus":{"_enum":{"Pending":"()","Completed":"Option<H256>","Cancelled":"()"}},"IssueRequest":{"vault":"AccountId","opentime":"BlockNumber","period":"BlockNumber","griefing_collateral":"Collateral","amount":"Wrapped","fee":"Wrapped","requester":"AccountId","btc_address":"BtcAddress","btc_public_key":"BtcPublicKey","btc_height":"u32","status":"IssueRequestStatus"},"RedeemRequestStatus":{"_enum":{"Pending":"()","Completed":"()","Reimbursed":"bool","Retried":"()"}},"CurrencyId":{"_enum":["DOT","INTERBTC","INTR","KSM","KBTC","KINT"]},"OracleKey":{"_enum":{"ExchangeRate":"CurrencyId","FeeEstimation":"()"}},"RedeemRequest":{"vault":"AccountId","opentime":"BlockNumber","period":"BlockNumber","fee":"Wrapped","transfer_fee_btc":"Wrapped","amount_btc":"Wrapped","premium":"Collateral","redeemer":"AccountId","btc_address":"BtcAddress","btc_height":"u32","status":"RedeemRequestStatus"},"ReplaceRequestStatus":{"_enum":["Pending","Completed","Cancelled"]},"ReplaceRequest":{"old_vault":"AccountId","new_vault":"AccountId","amount":"Wrapped","griefing_collateral":"Collateral","collateral":"Collateral","accept_time":"BlockNumber","period":"BlockNumber","btc_address":"BtcAddress","btc_height":"u32","status":"ReplaceRequestStatus"},"RefundRequest":{"vault":"AccountId","amount_issuing":"Wrapped","fee":"Wrapped","amount_btc":"Wrapped","issuer":"AccountId","btc_address":"BtcAddress","issue_id":"H256","completed":"bool"},"BalanceWrapper":{"amount":"String"},"TimestampedValue":{"value":"Value","timestamp":"Moment"},"Version":"u32","SystemVault":{"to_be_issued_tokens":"Wrapped","issued_tokens":"Wrapped","to_be_redeemed_tokens":"Wrapped","currency_id":"CurrencyId"},"DefaultSystemVault":"SystemVault","FixedPoint":"FixedI128","SignedFixedPoint":"FixedI128","UnsignedFixedPoint":"FixedU128","FundAccountJsonRpcRequest":{"account_id":"AccountId"}}}],"rpc":{"vaultRegistry":{"getVaultCollateral":{"description":"Get the vault\'s collateral (excluding nomination)","params":[{"name":"vault_id","type":"AccountId"}],"type":"BalanceWrapper"},"getVaultTotalCollateral":{"description":"Get the vault\'s collateral (including nomination)","params":[{"name":"vault_id","type":"AccountId"}],"type":"BalanceWrapper"},"getFirstVaultWithSufficientCollateral":{"description":"Get the first available vault with sufficient collateral to fulfil an issue request with the specified amount of InterBTC.","params":[{"name":"amount","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"AccountId"},"getFirstVaultWithSufficientTokens":{"description":"Get the first available vault with sufficient tokens to fulfil an redeem request with the specified amount of InterBTC.","params":[{"name":"amount","type":"BalanceWrapper"}],"type":"AccountId"},"getPremiumRedeemVaults":{"description":"Get all vaults below the premium redeem threshold.","params":[],"type":"Vec<(AccountId, BalanceWrapper)>"},"getVaultsWithIssuableTokens":{"description":"Get all vaults with non-zero issuable tokens, ordered in descending order of this amount","params":[],"type":"Vec<(AccountId, BalanceWrapper)>"},"getVaultsWithRedeemableTokens":{"description":"Get all vaults with non-zero redeemable tokens, ordered in descending order of this amount","params":[],"type":"Vec<(AccountId, BalanceWrapper)>"},"getIssueableTokensFromVault":{"description":"Get the amount of tokens a vault can issue","params":[{"name":"vault","type":"AccountId"}],"type":"BalanceWrapper"},"getCollateralizationFromVault":{"description":"Returns the collateralization of a specific vault","params":[{"name":"vault_id","type":"AccountId"},{"name":"only_issued","type":"bool"}],"type":"UnsignedFixedPoint"},"getCollateralizationFromVaultAndCollateral":{"description":"Returns the collateralization of a specific vault and collateral","params":[{"name":"vault_id","type":"AccountId"},{"name":"collateral","type":"BalanceWrapper"},{"name":"only_issued","type":"bool"}],"type":"UnsignedFixedPoint"},"getTotalCollateralization":{"description":"Get the total collateralization of the system","params":[],"type":"UnsignedFixedPoint"},"getRequiredCollateralForWrapped":{"description":"Get the amount of collateral required to issue an amount of InterBTC","params":[{"name":"amount_btc","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"},"getRequiredCollateralForVault":{"description":"Get the amount of collateral required for the given vault to be at the current SecureCollateralThreshold with the current exchange rate","params":[{"name":"vault_id","type":"AccountId"}],"type":"BalanceWrapper"},"isVaultBelowAuctionThreshold":{"description":"Check if the identified vault is below the auction threshold","params":[{"name":"vault_id","type":"AccountId"}],"type":"bool"}},"oracle":{"wrappedToCollateral":{"description":"Wrapped to Collateral exchange rate","params":[{"name":"amount","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"},"collateralToWrapped":{"description":"Collateral to Wrapped exchange rate","params":[{"name":"amount","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"}},"relay":{"isTransactionInvalid":{"description":"Given a sender\'s AccountId and the raw transaction data, determine if it\'s invalid","params":[{"name":"vault_id","type":"AccountId"},{"name":"raw_tx","type":"Vec<u8>"}],"type":"void"}},"issue":{"getIssueRequests":{"description":"Get all issue requests for a particular account","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<(H256, IssueRequest)>"},"getVaultIssueRequests":{"description":"Get all issue requests for a particular vault","params":[{"name":"vault_id","type":"AccountId"}],"type":"Vec<(H256, IssueRequest)>"}},"redeem":{"getRedeemRequests":{"description":"Get all redeem requests for a particular account","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<(H256, RedeemRequest)>"},"getVaultRedeemRequests":{"description":"Get all redeem requests for a particular vault","params":[{"name":"vault_id","type":"AccountId"}],"type":"Vec<(H256, RedeemRequest)>"}},"replace":{"getOldVaultReplaceRequests":{"description":"Get all replace requests from a particular vault","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<(H256, ReplaceRequest)>"},"getNewVaultReplaceRequests":{"description":"Get all replace requests to a particular vault","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<(H256, ReplaceRequest)>"}},"refund":{"getRefundRequests":{"description":"Get all refund requests for a particular account","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<(H256, RefundRequest)>"},"getRefundRequestsByIssueId":{"description":"Get all refund requests for a particular issue ID","params":[{"name":"issue_id","type":"H256"}],"type":"(H256, RefundRequest)"},"getVaultRefundRequests":{"description":"Get all refund requests for a particular vault","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<(H256, RefundRequest)>"}},"btcRelay":{"verifyBlockHeaderInclusion":{"description":"Verify that the block with the given hash is included","params":[{"name":"block_hash","type":"H256Le"}],"type":"void"}}},"alias":{"tokens":{"AccountData":"OrmlAccountData","BalanceLock":"OrmlBalanceLock"}},"instances":{"balances":["ksm","dot","interBTC"]}}')})(0,t,e),t})()})); | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var a=t();for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(this,(function(){return(()=>{"use strict";var e={d:(t,a)=>{for(var r in a)e.o(a,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:a[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};return((e,t,a)=>{a.r(t),a.d(t,{default:()=>r});const r=JSON.parse('{"types":[{"minmax":[0,null],"types":{"BalanceWrapper":{"amount":"String"},"CurrencyId":{"_enum":{"Token":"TokenSymbol","ForeignAsset":"ForeignAssetId","PToken":"PTokenId"}},"InterbtcPrimitivesCurrencyId":{"_enum":{"Token":"InterbtcPrimitivesTokenSymbol","ForeignAsset":"InterbtcForeignAssetId","PToken":"InterbtcPTokenId"}},"InterbtcForeignAssetId":"u32","ForeignAssetId":"u32","InterbtcPTokenId":"u32","PTokenId":"u32","FundAccountJsonRpcRequest":{"account_id":"AccountId","currency_id":"InterbtcPrimitivesCurrencyId"},"H256Le":"H256","SignedFixedPoint":"FixedU128","TokenSymbol":{"_enum":{"DOT":0,"IBTC":1,"INTR":2,"KSM":10,"KBTC":11,"KINT":12}},"InterbtcPrimitivesTokenSymbol":{"_enum":{"DOT":0,"IBTC":1,"INTR":2,"KSM":10,"KBTC":11,"KINT":12}},"UnsignedFixedPoint":"FixedU128","VaultCurrencyPair":{"collateral":"CurrencyId","wrapped":"CurrencyId"},"VaultId":{"account_id":"AccountId","currencies":"VaultCurrencyPair"}}}],"rpc":{"btcRelay":{"verifyBlockHeaderInclusion":{"description":"Verify that the block with the given hash is included","params":[{"name":"block_hash","type":"H256Le"}],"type":"void"}},"escrow":{"balanceAt":{"description":"Get a given user\'s escrowed balance","params":[{"name":"account_id","type":"AccountId"},{"name":"height","type":"Option<BlockNumber>"}],"type":"BalanceWrapper"},"totalSupply":{"description":"Get the total voting supply in the system","params":[{"name":"height","type":"Option<BlockNumber>"}],"type":"BalanceWrapper"}},"issue":{"getIssueRequests":{"description":"Get all issue request IDs for a particular account","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<H256>"},"getVaultIssueRequests":{"description":"Get all issue request IDs for a particular vault","params":[{"name":"vault_id","type":"AccountId"}],"type":"Vec<H256>"}},"oracle":{"collateralToWrapped":{"description":"Collateral to Wrapped exchange rate","params":[{"name":"amount","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"},"wrappedToCollateral":{"description":"Wrapped to Collateral exchange rate","params":[{"name":"amount","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"}},"redeem":{"getRedeemRequests":{"description":"Get all redeem request IDs for a particular account","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<H256>"},"getVaultRedeemRequests":{"description":"Get all redeem request IDs for a particular vault","params":[{"name":"vault_id","type":"AccountId"}],"type":"Vec<H256>"}},"refund":{"getRefundRequests":{"description":"Get all refund request IDs for a particular account","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<H256>"},"getRefundRequestsByIssueId":{"description":"Get all refund request IDs for a particular issue ID","params":[{"name":"issue_id","type":"H256"}],"type":"H256"},"getVaultRefundRequests":{"description":"Get all refund request IDs for a particular vault","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<H256>"}},"replace":{"getNewVaultReplaceRequests":{"description":"Get all replace request IDs to a particular vault","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<H256>"},"getOldVaultReplaceRequests":{"description":"Get all replace request IDs from a particular vault","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<H256>"}},"reward":{"computeEscrowReward":{"description":"Get a given user\'s rewards due","params":[{"name":"account_id","type":"AccountId"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"},"computeVaultReward":{"description":"Get a given vault\'s rewards due","params":[{"name":"vault_id","type":"VaultId"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"}},"vaultRegistry":{"getCollateralizationFromVault":{"description":"Returns the collateralization of a specific vault","params":[{"name":"vault","type":"VaultId"},{"name":"only_issued","type":"bool"}],"type":"UnsignedFixedPoint"},"getCollateralizationFromVaultAndCollateral":{"description":"Returns the collateralization of a specific vault and collateral","params":[{"name":"vault","type":"VaultId"},{"name":"collateral","type":"BalanceWrapper"},{"name":"only_issued","type":"bool"}],"type":"UnsignedFixedPoint"},"getIssueableTokensFromVault":{"description":"Get the amount of tokens a vault can issue","params":[{"name":"vault","type":"VaultId"}],"type":"BalanceWrapper"},"getPremiumRedeemVaults":{"description":"Get all vaults below the premium redeem threshold.","params":[],"type":"Vec<(VaultId, BalanceWrapper)>"},"getRequiredCollateralForVault":{"description":"Get the amount of collateral required for the given vault to be at the current SecureCollateralThreshold with the current exchange rate","params":[{"name":"vault_id","type":"VaultId"}],"type":"BalanceWrapper"},"getRequiredCollateralForWrapped":{"description":"Get the amount of collateral required to issue an amount of InterBTC","params":[{"name":"amount_btc","type":"BalanceWrapper"},{"name":"currency_id","type":"CurrencyId"}],"type":"BalanceWrapper"},"getVaultCollateral":{"description":"Get the vault\'s collateral (excluding nomination)","params":[{"name":"vault_id","type":"VaultId"}],"type":"BalanceWrapper"},"getVaultTotalCollateral":{"description":"Get the vault\'s collateral (including nomination)","params":[{"name":"vault_id","type":"VaultId"}],"type":"BalanceWrapper"},"getVaultsByAccountId":{"description":"Get all vaults that are registered using the given account _id","params":[{"name":"account_id","type":"AccountId"}],"type":"Vec<VaultId>"},"getVaultsWithIssuableTokens":{"description":"Get all vaults with non-zero issuable tokens, ordered in descending order of this amount","params":[],"type":"Vec<(VaultId, BalanceWrapper)>"},"getVaultsWithRedeemableTokens":{"description":"Get all vaults with non-zero redeemable tokens, ordered in descending order of this amount","params":[],"type":"Vec<(VaultId, BalanceWrapper)>"}}},"alias":{"tokens":{"AccountData":"OrmlAccountData","BalanceLock":"OrmlBalanceLock"}},"instances":{"balances":["ksm","kbtc","kint","dot","ibtc","intr"]}}')})(0,t,e),t})()})); |
@@ -6,204 +6,60 @@ { | ||
0, | ||
100 | ||
null | ||
], | ||
"types": { | ||
"H256Le": "H256", | ||
"Value": "i64", | ||
"Collateral": "Balance", | ||
"Wrapped": "Balance", | ||
"UnsignedInner": "u128", | ||
"StatusCode": { | ||
"_enum": [ | ||
"Running", | ||
"Error", | ||
"Shutdown" | ||
] | ||
"BalanceWrapper": { | ||
"amount": "String" | ||
}, | ||
"Address": "AccountId", | ||
"LookupSource": "AccountId", | ||
"Status": "StatusCode", | ||
"ErrorCode": { | ||
"_enum": [ | ||
"None", | ||
"OracleOffline" | ||
] | ||
}, | ||
"VaultStatus": { | ||
"CurrencyId": { | ||
"_enum": { | ||
"Active": "bool", | ||
"Liquidated": "()", | ||
"CommittedTheft": "()" | ||
"Token": "TokenSymbol", | ||
"ForeignAsset": "ForeignAssetId", | ||
"PToken": "PTokenId" | ||
} | ||
}, | ||
"RawBlockHeader": { | ||
"0": "[u8; 80]" | ||
}, | ||
"LockIdentifier": "[u8; 8]", | ||
"RichBlockHeader": { | ||
"block_header": "BlockHeader", | ||
"block_height": "u32", | ||
"chain_id": "u32", | ||
"para_height": "BlockNumber" | ||
}, | ||
"AccountData": { | ||
"free": "Balance", | ||
"reserved": "Balance", | ||
"frozen": "Balance" | ||
}, | ||
"OrmlAccountData": { | ||
"free": "Balance", | ||
"reserved": "Balance", | ||
"frozen": "Balance" | ||
}, | ||
"OrmlBalanceLock": { | ||
"amount": "Balance", | ||
"id": "LockIdentifier" | ||
}, | ||
"BlockHeader": { | ||
"merkle_root": "H256Le", | ||
"target": "U256", | ||
"timestamp": "u32", | ||
"version": "i32", | ||
"hash": "H256Le", | ||
"hash_prev_block": "H256Le", | ||
"nonce": "u32" | ||
}, | ||
"BlockChain": { | ||
"chain_id": "u32", | ||
"start_height": "u32", | ||
"max_height": "u32" | ||
}, | ||
"BtcAddress": { | ||
"InterbtcPrimitivesCurrencyId": { | ||
"_enum": { | ||
"P2PKH": "H160", | ||
"P2SH": "H160", | ||
"P2WPKHv0": "H160", | ||
"P2WSHv0": "H256" | ||
"Token": "InterbtcPrimitivesTokenSymbol", | ||
"ForeignAsset": "InterbtcForeignAssetId", | ||
"PToken": "InterbtcPTokenId" | ||
} | ||
}, | ||
"BtcPublicKey": "[u8; 33]", | ||
"Wallet": { | ||
"addresses": "BTreeSet<BtcAddress>", | ||
"public_key": "BtcPublicKey" | ||
"InterbtcForeignAssetId": "u32", | ||
"ForeignAssetId": "u32", | ||
"InterbtcPTokenId": "u32", | ||
"PTokenId": "u32", | ||
"FundAccountJsonRpcRequest": { | ||
"account_id": "AccountId", | ||
"currency_id": "InterbtcPrimitivesCurrencyId" | ||
}, | ||
"Vault": { | ||
"id": "AccountId", | ||
"wallet": "Wallet", | ||
"status": "VaultStatus", | ||
"banned_until": "Option<BlockNumber>", | ||
"to_be_issued_tokens": "Wrapped", | ||
"issued_tokens": "Wrapped", | ||
"to_be_redeemed_tokens": "Wrapped", | ||
"to_be_replaced_tokens": "Wrapped", | ||
"replace_collateral": "Collateral", | ||
"liquidated_collateral": "Collateral", | ||
"currency_id": "CurrencyId" | ||
}, | ||
"DefaultVault": "Vault", | ||
"IssueRequestStatus": { | ||
"H256Le": "H256", | ||
"SignedFixedPoint": "FixedU128", | ||
"TokenSymbol": { | ||
"_enum": { | ||
"Pending": "()", | ||
"Completed": "Option<H256>", | ||
"Cancelled": "()" | ||
"DOT": 0, | ||
"IBTC": 1, | ||
"INTR": 2, | ||
"KSM": 10, | ||
"KBTC": 11, | ||
"KINT": 12 | ||
} | ||
}, | ||
"IssueRequest": { | ||
"vault": "AccountId", | ||
"opentime": "BlockNumber", | ||
"period": "BlockNumber", | ||
"griefing_collateral": "Collateral", | ||
"amount": "Wrapped", | ||
"fee": "Wrapped", | ||
"requester": "AccountId", | ||
"btc_address": "BtcAddress", | ||
"btc_public_key": "BtcPublicKey", | ||
"btc_height": "u32", | ||
"status": "IssueRequestStatus" | ||
}, | ||
"RedeemRequestStatus": { | ||
"InterbtcPrimitivesTokenSymbol": { | ||
"_enum": { | ||
"Pending": "()", | ||
"Completed": "()", | ||
"Reimbursed": "bool", | ||
"Retried": "()" | ||
"DOT": 0, | ||
"IBTC": 1, | ||
"INTR": 2, | ||
"KSM": 10, | ||
"KBTC": 11, | ||
"KINT": 12 | ||
} | ||
}, | ||
"CurrencyId": { | ||
"_enum": [ | ||
"DOT", | ||
"INTERBTC", | ||
"INTR", | ||
"KSM", | ||
"KBTC", | ||
"KINT" | ||
] | ||
"UnsignedFixedPoint": "FixedU128", | ||
"VaultCurrencyPair": { | ||
"collateral": "CurrencyId", | ||
"wrapped": "CurrencyId" | ||
}, | ||
"OracleKey": { | ||
"_enum": { | ||
"ExchangeRate": "CurrencyId", | ||
"FeeEstimation": "()" | ||
} | ||
}, | ||
"RedeemRequest": { | ||
"vault": "AccountId", | ||
"opentime": "BlockNumber", | ||
"period": "BlockNumber", | ||
"fee": "Wrapped", | ||
"transfer_fee_btc": "Wrapped", | ||
"amount_btc": "Wrapped", | ||
"premium": "Collateral", | ||
"redeemer": "AccountId", | ||
"btc_address": "BtcAddress", | ||
"btc_height": "u32", | ||
"status": "RedeemRequestStatus" | ||
}, | ||
"ReplaceRequestStatus": { | ||
"_enum": [ | ||
"Pending", | ||
"Completed", | ||
"Cancelled" | ||
] | ||
}, | ||
"ReplaceRequest": { | ||
"old_vault": "AccountId", | ||
"new_vault": "AccountId", | ||
"amount": "Wrapped", | ||
"griefing_collateral": "Collateral", | ||
"collateral": "Collateral", | ||
"accept_time": "BlockNumber", | ||
"period": "BlockNumber", | ||
"btc_address": "BtcAddress", | ||
"btc_height": "u32", | ||
"status": "ReplaceRequestStatus" | ||
}, | ||
"RefundRequest": { | ||
"vault": "AccountId", | ||
"amount_issuing": "Wrapped", | ||
"fee": "Wrapped", | ||
"amount_btc": "Wrapped", | ||
"issuer": "AccountId", | ||
"btc_address": "BtcAddress", | ||
"issue_id": "H256", | ||
"completed": "bool" | ||
}, | ||
"BalanceWrapper": { | ||
"amount": "String" | ||
}, | ||
"TimestampedValue": { | ||
"value": "Value", | ||
"timestamp": "Moment" | ||
}, | ||
"Version": "u32", | ||
"SystemVault": { | ||
"to_be_issued_tokens": "Wrapped", | ||
"issued_tokens": "Wrapped", | ||
"to_be_redeemed_tokens": "Wrapped", | ||
"currency_id": "CurrencyId" | ||
}, | ||
"DefaultSystemVault": "SystemVault", | ||
"FixedPoint": "FixedI128", | ||
"SignedFixedPoint": "FixedI128", | ||
"UnsignedFixedPoint": "FixedU128", | ||
"FundAccountJsonRpcRequest": { | ||
"account_id": "AccountId" | ||
"VaultId": { | ||
"account_id": "AccountId", | ||
"currencies": "VaultCurrencyPair" | ||
} | ||
@@ -214,74 +70,53 @@ } | ||
"rpc": { | ||
"vaultRegistry": { | ||
"getVaultCollateral": { | ||
"description": "Get the vault's collateral (excluding nomination)", | ||
"btcRelay": { | ||
"verifyBlockHeaderInclusion": { | ||
"description": "Verify that the block with the given hash is included", | ||
"params": [ | ||
{ | ||
"name": "vault_id", | ||
"type": "AccountId" | ||
"name": "block_hash", | ||
"type": "H256Le" | ||
} | ||
], | ||
"type": "BalanceWrapper" | ||
}, | ||
"getVaultTotalCollateral": { | ||
"description": "Get the vault's collateral (including nomination)", | ||
"type": "void" | ||
} | ||
}, | ||
"escrow": { | ||
"balanceAt": { | ||
"description": "Get a given user's escrowed balance", | ||
"params": [ | ||
{ | ||
"name": "vault_id", | ||
"name": "account_id", | ||
"type": "AccountId" | ||
} | ||
], | ||
"type": "BalanceWrapper" | ||
}, | ||
"getFirstVaultWithSufficientCollateral": { | ||
"description": "Get the first available vault with sufficient collateral to fulfil an issue request with the specified amount of InterBTC.", | ||
"params": [ | ||
{ | ||
"name": "amount", | ||
"type": "BalanceWrapper" | ||
}, | ||
{ | ||
"name": "currency_id", | ||
"type": "CurrencyId" | ||
"name": "height", | ||
"type": "Option<BlockNumber>" | ||
} | ||
], | ||
"type": "AccountId" | ||
"type": "BalanceWrapper" | ||
}, | ||
"getFirstVaultWithSufficientTokens": { | ||
"description": "Get the first available vault with sufficient tokens to fulfil an redeem request with the specified amount of InterBTC.", | ||
"totalSupply": { | ||
"description": "Get the total voting supply in the system", | ||
"params": [ | ||
{ | ||
"name": "amount", | ||
"type": "BalanceWrapper" | ||
"name": "height", | ||
"type": "Option<BlockNumber>" | ||
} | ||
], | ||
"type": "AccountId" | ||
}, | ||
"getPremiumRedeemVaults": { | ||
"description": "Get all vaults below the premium redeem threshold.", | ||
"params": [], | ||
"type": "Vec<(AccountId, BalanceWrapper)>" | ||
}, | ||
"getVaultsWithIssuableTokens": { | ||
"description": "Get all vaults with non-zero issuable tokens, ordered in descending order of this amount", | ||
"params": [], | ||
"type": "Vec<(AccountId, BalanceWrapper)>" | ||
}, | ||
"getVaultsWithRedeemableTokens": { | ||
"description": "Get all vaults with non-zero redeemable tokens, ordered in descending order of this amount", | ||
"params": [], | ||
"type": "Vec<(AccountId, BalanceWrapper)>" | ||
}, | ||
"getIssueableTokensFromVault": { | ||
"description": "Get the amount of tokens a vault can issue", | ||
"type": "BalanceWrapper" | ||
} | ||
}, | ||
"issue": { | ||
"getIssueRequests": { | ||
"description": "Get all issue request IDs for a particular account", | ||
"params": [ | ||
{ | ||
"name": "vault", | ||
"name": "account_id", | ||
"type": "AccountId" | ||
} | ||
], | ||
"type": "BalanceWrapper" | ||
"type": "Vec<H256>" | ||
}, | ||
"getCollateralizationFromVault": { | ||
"description": "Returns the collateralization of a specific vault", | ||
"getVaultIssueRequests": { | ||
"description": "Get all issue request IDs for a particular vault", | ||
"params": [ | ||
@@ -291,38 +126,27 @@ { | ||
"type": "AccountId" | ||
}, | ||
{ | ||
"name": "only_issued", | ||
"type": "bool" | ||
} | ||
], | ||
"type": "UnsignedFixedPoint" | ||
}, | ||
"getCollateralizationFromVaultAndCollateral": { | ||
"description": "Returns the collateralization of a specific vault and collateral", | ||
"type": "Vec<H256>" | ||
} | ||
}, | ||
"oracle": { | ||
"collateralToWrapped": { | ||
"description": "Collateral to Wrapped exchange rate", | ||
"params": [ | ||
{ | ||
"name": "vault_id", | ||
"type": "AccountId" | ||
}, | ||
{ | ||
"name": "collateral", | ||
"name": "amount", | ||
"type": "BalanceWrapper" | ||
}, | ||
{ | ||
"name": "only_issued", | ||
"type": "bool" | ||
"name": "currency_id", | ||
"type": "CurrencyId" | ||
} | ||
], | ||
"type": "UnsignedFixedPoint" | ||
"type": "BalanceWrapper" | ||
}, | ||
"getTotalCollateralization": { | ||
"description": "Get the total collateralization of the system", | ||
"params": [], | ||
"type": "UnsignedFixedPoint" | ||
}, | ||
"getRequiredCollateralForWrapped": { | ||
"description": "Get the amount of collateral required to issue an amount of InterBTC", | ||
"wrappedToCollateral": { | ||
"description": "Wrapped to Collateral exchange rate", | ||
"params": [ | ||
{ | ||
"name": "amount_btc", | ||
"name": "amount", | ||
"type": "BalanceWrapper" | ||
@@ -336,15 +160,17 @@ }, | ||
"type": "BalanceWrapper" | ||
}, | ||
"getRequiredCollateralForVault": { | ||
"description": "Get the amount of collateral required for the given vault to be at the current SecureCollateralThreshold with the current exchange rate", | ||
} | ||
}, | ||
"redeem": { | ||
"getRedeemRequests": { | ||
"description": "Get all redeem request IDs for a particular account", | ||
"params": [ | ||
{ | ||
"name": "vault_id", | ||
"name": "account_id", | ||
"type": "AccountId" | ||
} | ||
], | ||
"type": "BalanceWrapper" | ||
"type": "Vec<H256>" | ||
}, | ||
"isVaultBelowAuctionThreshold": { | ||
"description": "Check if the identified vault is below the auction threshold", | ||
"getVaultRedeemRequests": { | ||
"description": "Get all redeem request IDs for a particular vault", | ||
"params": [ | ||
@@ -356,54 +182,40 @@ { | ||
], | ||
"type": "bool" | ||
"type": "Vec<H256>" | ||
} | ||
}, | ||
"oracle": { | ||
"wrappedToCollateral": { | ||
"description": "Wrapped to Collateral exchange rate", | ||
"refund": { | ||
"getRefundRequests": { | ||
"description": "Get all refund request IDs for a particular account", | ||
"params": [ | ||
{ | ||
"name": "amount", | ||
"type": "BalanceWrapper" | ||
}, | ||
{ | ||
"name": "currency_id", | ||
"type": "CurrencyId" | ||
"name": "account_id", | ||
"type": "AccountId" | ||
} | ||
], | ||
"type": "BalanceWrapper" | ||
"type": "Vec<H256>" | ||
}, | ||
"collateralToWrapped": { | ||
"description": "Collateral to Wrapped exchange rate", | ||
"getRefundRequestsByIssueId": { | ||
"description": "Get all refund request IDs for a particular issue ID", | ||
"params": [ | ||
{ | ||
"name": "amount", | ||
"type": "BalanceWrapper" | ||
}, | ||
{ | ||
"name": "currency_id", | ||
"type": "CurrencyId" | ||
"name": "issue_id", | ||
"type": "H256" | ||
} | ||
], | ||
"type": "BalanceWrapper" | ||
} | ||
}, | ||
"relay": { | ||
"isTransactionInvalid": { | ||
"description": "Given a sender's AccountId and the raw transaction data, determine if it's invalid", | ||
"type": "H256" | ||
}, | ||
"getVaultRefundRequests": { | ||
"description": "Get all refund request IDs for a particular vault", | ||
"params": [ | ||
{ | ||
"name": "vault_id", | ||
"name": "account_id", | ||
"type": "AccountId" | ||
}, | ||
{ | ||
"name": "raw_tx", | ||
"type": "Vec<u8>" | ||
} | ||
], | ||
"type": "void" | ||
"type": "Vec<H256>" | ||
} | ||
}, | ||
"issue": { | ||
"getIssueRequests": { | ||
"description": "Get all issue requests for a particular account", | ||
"replace": { | ||
"getNewVaultReplaceRequests": { | ||
"description": "Get all replace request IDs to a particular vault", | ||
"params": [ | ||
@@ -415,18 +227,18 @@ { | ||
], | ||
"type": "Vec<(H256, IssueRequest)>" | ||
"type": "Vec<H256>" | ||
}, | ||
"getVaultIssueRequests": { | ||
"description": "Get all issue requests for a particular vault", | ||
"getOldVaultReplaceRequests": { | ||
"description": "Get all replace request IDs from a particular vault", | ||
"params": [ | ||
{ | ||
"name": "vault_id", | ||
"name": "account_id", | ||
"type": "AccountId" | ||
} | ||
], | ||
"type": "Vec<(H256, IssueRequest)>" | ||
"type": "Vec<H256>" | ||
} | ||
}, | ||
"redeem": { | ||
"getRedeemRequests": { | ||
"description": "Get all redeem requests for a particular account", | ||
"reward": { | ||
"computeEscrowReward": { | ||
"description": "Get a given user's rewards due", | ||
"params": [ | ||
@@ -436,81 +248,136 @@ { | ||
"type": "AccountId" | ||
}, | ||
{ | ||
"name": "currency_id", | ||
"type": "CurrencyId" | ||
} | ||
], | ||
"type": "Vec<(H256, RedeemRequest)>" | ||
"type": "BalanceWrapper" | ||
}, | ||
"getVaultRedeemRequests": { | ||
"description": "Get all redeem requests for a particular vault", | ||
"computeVaultReward": { | ||
"description": "Get a given vault's rewards due", | ||
"params": [ | ||
{ | ||
"name": "vault_id", | ||
"type": "AccountId" | ||
"type": "VaultId" | ||
}, | ||
{ | ||
"name": "currency_id", | ||
"type": "CurrencyId" | ||
} | ||
], | ||
"type": "Vec<(H256, RedeemRequest)>" | ||
"type": "BalanceWrapper" | ||
} | ||
}, | ||
"replace": { | ||
"getOldVaultReplaceRequests": { | ||
"description": "Get all replace requests from a particular vault", | ||
"vaultRegistry": { | ||
"getCollateralizationFromVault": { | ||
"description": "Returns the collateralization of a specific vault", | ||
"params": [ | ||
{ | ||
"name": "account_id", | ||
"type": "AccountId" | ||
"name": "vault", | ||
"type": "VaultId" | ||
}, | ||
{ | ||
"name": "only_issued", | ||
"type": "bool" | ||
} | ||
], | ||
"type": "Vec<(H256, ReplaceRequest)>" | ||
"type": "UnsignedFixedPoint" | ||
}, | ||
"getNewVaultReplaceRequests": { | ||
"description": "Get all replace requests to a particular vault", | ||
"getCollateralizationFromVaultAndCollateral": { | ||
"description": "Returns the collateralization of a specific vault and collateral", | ||
"params": [ | ||
{ | ||
"name": "account_id", | ||
"type": "AccountId" | ||
"name": "vault", | ||
"type": "VaultId" | ||
}, | ||
{ | ||
"name": "collateral", | ||
"type": "BalanceWrapper" | ||
}, | ||
{ | ||
"name": "only_issued", | ||
"type": "bool" | ||
} | ||
], | ||
"type": "Vec<(H256, ReplaceRequest)>" | ||
} | ||
}, | ||
"refund": { | ||
"getRefundRequests": { | ||
"description": "Get all refund requests for a particular account", | ||
"type": "UnsignedFixedPoint" | ||
}, | ||
"getIssueableTokensFromVault": { | ||
"description": "Get the amount of tokens a vault can issue", | ||
"params": [ | ||
{ | ||
"name": "account_id", | ||
"type": "AccountId" | ||
"name": "vault", | ||
"type": "VaultId" | ||
} | ||
], | ||
"type": "Vec<(H256, RefundRequest)>" | ||
"type": "BalanceWrapper" | ||
}, | ||
"getRefundRequestsByIssueId": { | ||
"description": "Get all refund requests for a particular issue ID", | ||
"getPremiumRedeemVaults": { | ||
"description": "Get all vaults below the premium redeem threshold.", | ||
"params": [], | ||
"type": "Vec<(VaultId, BalanceWrapper)>" | ||
}, | ||
"getRequiredCollateralForVault": { | ||
"description": "Get the amount of collateral required for the given vault to be at the current SecureCollateralThreshold with the current exchange rate", | ||
"params": [ | ||
{ | ||
"name": "issue_id", | ||
"type": "H256" | ||
"name": "vault_id", | ||
"type": "VaultId" | ||
} | ||
], | ||
"type": "(H256, RefundRequest)" | ||
"type": "BalanceWrapper" | ||
}, | ||
"getVaultRefundRequests": { | ||
"description": "Get all refund requests for a particular vault", | ||
"getRequiredCollateralForWrapped": { | ||
"description": "Get the amount of collateral required to issue an amount of InterBTC", | ||
"params": [ | ||
{ | ||
"name": "account_id", | ||
"type": "AccountId" | ||
"name": "amount_btc", | ||
"type": "BalanceWrapper" | ||
}, | ||
{ | ||
"name": "currency_id", | ||
"type": "CurrencyId" | ||
} | ||
], | ||
"type": "Vec<(H256, RefundRequest)>" | ||
} | ||
}, | ||
"btcRelay": { | ||
"verifyBlockHeaderInclusion": { | ||
"description": "Verify that the block with the given hash is included", | ||
"type": "BalanceWrapper" | ||
}, | ||
"getVaultCollateral": { | ||
"description": "Get the vault's collateral (excluding nomination)", | ||
"params": [ | ||
{ | ||
"name": "block_hash", | ||
"type": "H256Le" | ||
"name": "vault_id", | ||
"type": "VaultId" | ||
} | ||
], | ||
"type": "void" | ||
"type": "BalanceWrapper" | ||
}, | ||
"getVaultTotalCollateral": { | ||
"description": "Get the vault's collateral (including nomination)", | ||
"params": [ | ||
{ | ||
"name": "vault_id", | ||
"type": "VaultId" | ||
} | ||
], | ||
"type": "BalanceWrapper" | ||
}, | ||
"getVaultsByAccountId": { | ||
"description": "Get all vaults that are registered using the given account _id", | ||
"params": [ | ||
{ | ||
"name": "account_id", | ||
"type": "AccountId" | ||
} | ||
], | ||
"type": "Vec<VaultId>" | ||
}, | ||
"getVaultsWithIssuableTokens": { | ||
"description": "Get all vaults with non-zero issuable tokens, ordered in descending order of this amount", | ||
"params": [], | ||
"type": "Vec<(VaultId, BalanceWrapper)>" | ||
}, | ||
"getVaultsWithRedeemableTokens": { | ||
"description": "Get all vaults with non-zero redeemable tokens, ordered in descending order of this amount", | ||
"params": [], | ||
"type": "Vec<(VaultId, BalanceWrapper)>" | ||
} | ||
@@ -528,6 +395,9 @@ } | ||
"ksm", | ||
"kbtc", | ||
"kint", | ||
"dot", | ||
"interBTC" | ||
"ibtc", | ||
"intr" | ||
] | ||
} | ||
} | ||
} |
{ | ||
"name": "@interlay/interbtc-types", | ||
"version": "0.12.5", | ||
"version": "0.30.0", | ||
"description": "Substrate types used in InterBTC parachain", | ||
@@ -23,2 +23,2 @@ "main": "build/index.js", | ||
} | ||
} | ||
} |
@@ -5,3 +5,2 @@ # InterBTC Types | ||
## Usage | ||
@@ -8,0 +7,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33837
421
15
1