@namespace("stellar.1") protocol local { import idl "common.avdl"; // ------------------------------------------------------- // frontend protocol // ------------------------------------------------------- record WalletAccountLocal { AccountID accountID; // string "GCKLHXC22222252UOISFKYZQX7YIVDBPSZ7UUYDFK6URTG6VDRANPC5K" boolean isDefault; // true if this is the default sending/receiving account string name; // the user-given name for the account string balanceDescription; // example: "56.0227002 XLM + more" string seqno; // the stellar sequence number for this account CurrencyLocal currencyLocal;// user configurable, defaults to USD and related details AccountMode accountMode; // mobile only vs all devices boolean accountModeEditable;// is this device able to change it boolean deviceReadOnly; // is account read only for current device (because of mobileOnly mode) boolean isFunded; // does the account have minimum amount of XLM to exist on the network boolean canSubmitTx; // does the account have enough XLM to submit a transaction (enough for the fee) boolean canAddTrustline; // Whether or not there is enough native balance in the account to create a trustline } array getWalletAccountsLocal(int sessionID); WalletAccountLocal getWalletAccountLocal(int sessionID, AccountID accountID); record AccountAssetLocal { string name; // "Lumens" for native. AssetCode like "BTC" for non-native. string assetCode; // "XLM", "BTC" string issuerName; // "Stellar network" for native. Blank or like "Stronghold" for non-native. Note that for non-native this is just whatever they want to put in the stellar.toml file so shouldn't be trusted. string issuerAccountID; // "" for native. Like "GCKLHXC22222252UOISFKYZQX7YIVDBPSZ7UUYDFK6URTG6VDRANPC5K" for non-native. string issuerVerifiedDomain; // "" for native. Like "stronghold.co" for non-native. This is a verified value and can be trusted. string balanceTotal; // "280.9192933" string balanceAvailableToSend; // Available to send. Like "279.9192933". Same as balanceTotal for non-native. string worthCurrency; // "USD", "CAD", etc. If it is "ERR" then an exchange rate error occurred. Blank for non-native. string worth; // "$98.13 USD" or error string if worthCurrency == "ERR". Blank for non-native. // Available to send in worthCurrency. // Like "$97.83 USD" for native. // Blank for non-native. // Error string when worthCurrency is "ERR". string availableToSendWorth; array reserves; // only added to native (XLM) asset. string desc; string infoUrl; // 'https://...' or empty string infoUrlText; // the text to use in the infoUrl link boolean showDepositButton; // if true, show a deposit button string depositButtonText; // the text to show in the deposit button, most likely "Deposit" boolean showWithdrawButton; // if true, show a withdraw button string withdrawButtonText; // the text to show in the withdraw button, most likely "Withdraw" } array getAccountAssetsLocal(int sessionID, AccountID accountID); enum BalanceDelta { NONE_0, INCREASE_1, DECREASE_2 } enum PaymentStatus { NONE_0, PENDING_1, CLAIMABLE_2, COMPLETED_3, ERROR_4, UNKNOWN_5, CANCELED_6 // Relay payment that has been yanked } enum ParticipantType { NONE_0, KEYBASE_1, STELLAR_2, SBS_3, OWNACCOUNT_4 } record PaymentOrErrorLocal { union { null, PaymentLocal } payment; union { null, string } err; } record PaymentsPageLocal { array payments; union { null, PageCursor } cursor; union { null, PaymentID } oldestUnread; // draw orange line underneath this payment } PaymentsPageLocal getPaymentsLocal(int sessionID, AccountID accountID, union { null, PageCursor } cursor); array getPendingPaymentsLocal(int sessionID, AccountID accountID); // markAsReadLocal will mark as "read" all the payments created at or before the time // of the payment referenced by `mostRecentID`. void markAsReadLocal(int sessionID, AccountID accountID, PaymentID mostRecentID); // Summary of a payment. record PaymentLocal { PaymentID id; TransactionID txID; // For relay payments, the funding tx. TimeMs time; PaymentStatus statusSimplified; string statusDescription; // "pending", "completed", "error", "claimable", "canceled" string statusDetail; boolean showCancel; // true if cancel is an option for this payment string amountDescription; // "1,323.1234567 XLM" - always amount of XLM, even if converted from OutsideCurrency BalanceDelta delta; // NONE/INCREASE/DECREASE (e.g. INCREASE for "+ 1,323.1234567 XLM" amount above) string worth; // "$123.23 CLP", senders intended amount if this was made as a lumens-worth-currency payment string worthAtSendTime; // "$123.23 CLP", amount in current user's display currency. Set if frontend should show an // (APPROXIMATELY $X.XX) message i.e. if this is a pure-XLM payment. string issuerDescription; // For non-XLM assets: either "Unknown issuer" or domain name // ("example.com") if domain is verified by stellard. union{ null, AccountID } issuerAccountID; // What type to display the sender and recipient as. // Either neither or both are OWNACCOUNT. ParticipantType fromType; // cannot be SBS ParticipantType toType; string assetCode; // The code of the destination asset. e.g., "USD", "XLM", etc. AccountID fromAccountID; // Always filled string fromAccountName; // Optional. User's name for the account or Account ID if not named. Filled if fromType = OWNACCOUNT string fromUsername; // Optional. Filled if KEYBASE. union { null, AccountID } toAccountID; // Optional. string toAccountName; // Optional. Filled if toType = OWNACCOUNT string toUsername; // Optional. Filled if KEYBASE. string toAssertion; // Optional. Filled if SBS and statusSimplified != 'canceled' string originalToAssertion; // Optional. Username or SBS. Filled if statusSimplified == 'canceled' string note; // secret note string noteErr; // for path payments: string sourceAmountMax; string sourceAmountActual; Asset sourceAsset; string sourceConvRate; // The amount of the destination asset worth 1 unit of the source asset at the time of the transaction // for non-payment txs, multiple ops: boolean isAdvanced; string summaryAdvanced; // if isAdvanced is true, just show this string array operations; // string summary of each operation in the transaction boolean unread; // true if user hasn't seen the payment yet (sourceType STELLAR only) string batchID; // if payment sent via batch, will contain the batch id boolean fromAirdrop; // true if payment pertains to a keybase airdrop boolean isInflation; // true if payment from known inflation source union { null, string } inflationSource; // name of inflation source union { null, PaymentTrustlineLocal } trustline; // this tx is only a trust line change. } // Details of a payment. record PaymentDetailsLocal { PaymentLocal summary; PaymentDetailsOnlyLocal details; } record PaymentDetailsOnlyLocal { string publicNote; // public memo for the payment string publicNoteType; // public memo type: "text", "id", "hash", "return" @lint("ignore") string externalTxURL; // link to external web page with tx details string feeChargedDescription; // "0.0000100 XLM" the actual fee that was charged for this tx (formatted) array pathIntermediate; // for payment paths, the additional hops it took } record PaymentTrustlineLocal { Asset asset; boolean remove; } // accountID should be the accountID that you want the details for. // This is used for formatting the `amountDescription` to know if it // is a payment that increases or decreases the balance. PaymentDetailsLocal getPaymentDetailsLocal(int sessionID, AccountID accountID, PaymentID id); // only use getGenericPaymentDetailsLocal if you don't know the account ID. // Without account ID, we can't fill in a variety of information and we // can't handle multi-operation transactions. PaymentDetailsLocal getGenericPaymentDetailsLocal(int sessionID, PaymentID id); record CurrencyLocal { string description; // "USD ($)", "CAD ($)", etc. OutsideCurrencyCode code; // "USD", "CAD", etc. string symbol; // "$" string name; // "US Dollar", "Thai Baht", etc. } array getDisplayCurrenciesLocal(int sessionID); void validateAccountIDLocal(int sessionID, AccountID accountID); void validateSecretKeyLocal(int sessionID, SecretKey secretKey); // Validates a name for a new account. Checks if any accounts have the same name. // If there is an error getting account names, the error is suppressed. void validateAccountNameLocal(int sessionID, string name); WalletAccountLocal changeWalletAccountNameLocal(int sessionID, AccountID accountID, string newName); array setWalletAccountAsDefaultLocal(int sessionID, AccountID accountID); // Deleting an account is irreversible, even with Keybase, Inc. help. // Consumer of this API should always prompt the user and warn that if // their secret key is not backed up, they will not be able to access // funds on that account. // This RPC checks if `userAcknowledged` string is equal to "yes". void deleteWalletAccountLocal(int sessionID, AccountID accountID, string userAcknowledged); AccountID linkNewWalletAccountLocal(int sessionID, SecretKey secretKey, string name); AccountID createWalletAccountLocal(int sessionID, string name); // OutsideCurrencyCode examples: "USD", "EUR". Has to be one of // supported currencies, returned from getDisplayCurrenciesLocal. CurrencyLocal changeDisplayCurrencyLocal(int sessionID, AccountID accountID, OutsideCurrencyCode currency); // Gets display currency for primary account if no accountID is given. CurrencyLocal getDisplayCurrencyLocal(int sessionID, union { null, AccountID } accountID); bool hasAcceptedDisclaimerLocal(int sessionID); void acceptDisclaimerLocal(int sessionID); string getWalletAccountPublicKeyLocal(int sessionID, AccountID accountID); SecretKey getWalletAccountSecretKeyLocal(int sessionID, AccountID accountID); // Get the non-XLM assets for sending. array getSendAssetChoicesLocal( int sessionID, AccountID from, string to // Optional. Username, acctID, or assertion. ); record SendAssetChoiceLocal { Asset asset; // Enable the row. True means the recipient accepts this asset. // False if there's no recipient, or an error loading them, or they don't accept. boolean enabled; string left; // Example: "BTC" string right; // Examples: "Stronghold.com", "GBSTRH4QOTWNSVA6E4HFERETX4ZLSR3CIUBLK7AXYII277PFJC4BBYOG" string subtext; // Examples: "", "max doesn't accept HUGZ" } // An ID representing a session with the send form. @typedef("string") record BuildPaymentID {} BuildPaymentID startBuildPaymentLocal(int sessionID); void stopBuildPaymentLocal(int sessionID, BuildPaymentID bid); // Check but do not send a payment. // Arguments are optional unless marked [required] or otherwise described. // However, a coherent payment is required in order for res.readyToSend to returned as true. BuildPaymentResLocal buildPaymentLocal( int sessionID, BuildPaymentID bid, // Exactly one of `from` and `fromPrimaryAccount` must be set. AccountID from, boolean fromPrimaryAccount, // Whether to send from the user's primary account. // Recipient username, acctID, or assertion. // Examples: "", "russel", "GBQTE2V7Y356TFBZL6YZ2PA3KIILNSAAQRV5C7MVWS22KQTS4EMK7I46" string to, boolean toIsAccountID, // [required] string amount, // Amount of the asset OR outside currency being sent. Example: "3.005" // Zero or one of `asset` and `currency` should be set. // If both are null or `asset` is native then XLM are being sent. // If `currency` is set then XLM is being sent after converting `amount`. // Note: Sending non-XLM assets is not yet supported. union { null, OutsideCurrencyCode } currency, union { null, Asset } asset, string secretNote, // Encrypted for the sender, and recipient if possible. string publicMemo // Public stellar memo field. ); record BuildPaymentResLocal { boolean readyToReview; // Optional. Set if a valid account ID to send from was found. AccountID from; // Optional. Error to show with the To field. // All errMsg fields are in 'keybase chat language' markdown. // Example: "This stellar address is incorrect" string toErrMsg; // Optional. Error to show with the amount field. // Example: "russel doesn't accept *BTC/Stronghold.com*\nPlease pick another asset." // Example: "You only have *128.4567890 XLM* available to send." string amountErrMsg; // Optional. Error to show with the encrypted note field. // Example: "Note is too long" string secretNoteErrMsg; // Optional. Error to show with the public memo field. // Example: "Public memo is too long" string publicMemoErrMsg; // Optional. Public memo override (if federation lookup returned one). string publicMemoOverride; // All these worth fields are pretty confusing. // Leaving them in, but adding fields below to simplify, then // perhaps we can clean some of these out. // Optional. Blank if non-native assets are being sent or if there is a global error. // Example: "96.5634762 XLM" // Example: "$246.47" string worthDescription; // Set with `worthDescription` // Example: "$1 = 5.0992345 XLM\nSource: coinmarketcap.com" string worthInfo; // Set with `worthDescription` // Amount of local (non-XLM) currency in XLM // Example: "5.0992345" string worthAmount; // Set with `worthDescription` // Local currency if not XLM string worthCurrency; // New fields: @lint("ignore") string displayAmountXLM; // "43.2339393 XLM" string displayAmountFiat; // "$1.23 USD" @lint("ignore") boolean sendingIntentionXLM; // true if currency is nil string amountAvailable; // "3280.435 XLM available" array banners; } enum AdvancedBanner { NO_BANNER_0, SENDER_BANNER_1, RECEIVER_BANNER_2 } record SendBannerLocal { string level; // One of: "info", "warning", "error" // Example (info): "Because it’s russel’s first transaction, you must send at least 1 XLM." // Example (warning): "You are not following russel. Are you sure this is the right person?" string message; // Set if this banner means the user's proofs have changed and that is blocking the payment. // `message` may be blank in this case. boolean proofsChanged; // Set if this banner means there are valid trustlines for non-native assets to be sent from // the from address to the to address. `message` may be blank in this case. AdvancedBanner offerAdvancedSendForm; } // Called when Send is tapped from the build form. // Sends uiPaymentReview notifications while it is open. void reviewPaymentLocal( int sessionID, int reviewID, // ID reflected back to and used only by the frontend. // Should be the latest ID that went through buildPaymentLocal and returned readyToReview. BuildPaymentID bid ); // Send a payment SendPaymentResLocal sendPaymentLocal( int sessionID, BuildPaymentID bid, boolean bypassBid, // implies bypassReview boolean bypassReview, AccountID from, string to, // Username, acctID, or assertion. Examples: "russel", "GBQTE2V7Y356TFBZL6YZ2PA3KIILNSAAQRV5C7MVWS22KQTS4EMK7I46" boolean toIsAccountID, string amount, // Amount of the Stellar asset. Example: "30.005" Asset asset, // Asset to send. string worthAmount, // Optional. Example: "2.00" union { null, OutsideCurrencyCode } worthCurrency, // Set with `worthAmount`. string secretNote, // Optional. Encrypted for the sender, and recipient if possible. string publicMemo, // Optional. Public stellar memo field. // If quickReturn == true then the RPC can return success // while the payment is still pending on the stellar network. boolean quickReturn ); record SendPaymentResLocal { KeybaseTransactionID kbTxID; // If (arg.quickReturn && result.pending) then the payment // was recorded but may still be pending on the stellar network // and could still fail. // If arg.quickReturn == false then result.pending should be ignored. boolean pending; string jumpToChat; } SendPaymentResLocal sendPathLocal(AccountID source, string recipient, PaymentPath path, string note, string publicNote); // Check but do not send a request. // // Arguments are optional unless otherwise described. However, a coherent // payment is required in order for res.readyToRequest to be returned as // true. BuildRequestResLocal buildRequestLocal( int sessionID, // Requestee username or assertion. Examples: "russel", "t_alice", "bob@twitter" string to, string amount, // Amount of the asset OR outside currency being requested. Example: "3.005" // At most one of `asset` and `currency` should be set. union { null, Asset } asset, // Note: Requesting non-XLM assets is not yet supported. (Miles: It may // actually be supported, but that would be a weird asymmetry) union { null, OutsideCurrencyCode } currency, string secretNote // Encrypted for the sender and recipient. ); record BuildRequestResLocal { boolean readyToRequest; // Optional. Error to show with the To field. // All errMsg fields are in 'keybase chat language' markdown. // Example: "recipient not found" string toErrMsg; // Optional. Error to show with the amount field. // Example: "Invalid amount." string amountErrMsg; // Optional. Error to show with the encrypted note field. // Example: "Note is too long" string secretNoteErrMsg; // Optional. Blank if non-native assets are being requested or if there is a global error. // Example: "96.5634762 XLM" // Example: "$246.47" string worthDescription; // Set with `worthDescription` // Example: "$1 = 5.0992345 XLM\nSource: coinmarketcap.com" string worthInfo; @lint("ignore") string displayAmountXLM; // "43.2339393 XLM" string displayAmountFiat; // "$1.23 USD" @lint("ignore") boolean sendingIntentionXLM; // true if currency is nil array banners; } record RequestDetailsLocal { KeybaseRequestID id; // User asking for payment - creator of the request. string fromAssertion; // creator username boolean fromCurrentUser; // is this request coming from us? // User being asked for payment. ParticipantType toUserType; // keybase or SBS string toAssertion; // keybase username or sbs assertion. // Raw unformatted amount and asset/currency that come with the // request. Can be used directly to build a payment. string amount; // Exactly one of asset or currency below is filled union { null, Asset } asset; union { null, OutsideCurrencyCode } currency; // Formatted amount of either outside currency or stellar lumens. string amountDescription; // "$123.23 CAD" string worthAtRequestTime; // "$123.23 CLP", amount in current user's display currency. // Set if frontend should show an (APPROXIMATELY $X.XX) message. RequestStatus status; } RequestDetailsLocal getRequestDetailsLocal(int sessionID, KeybaseRequestID reqID); void cancelRequestLocal(int sessionID, KeybaseRequestID reqID); KeybaseRequestID makeRequestLocal(int sessionID, string recipient, union { null, Asset } asset, union { null, OutsideCurrencyCode } currency, string amount, string note); void setAccountMobileOnlyLocal(int sessionID, AccountID accountID); void setAccountAllDevicesLocal(int sessionID, AccountID accountID); // opposite of mobile-only boolean isAccountMobileOnlyLocal(int sessionID, AccountID accountID); RelayClaimResult cancelPaymentLocal(int sessionID, PaymentID paymentID); @typedef("string") record InflationDestinationTag {} record PredefinedInflationDestination { InflationDestinationTag tag; // "sdf" string name; // "Stellar Development Foundation" boolean recommended; // false AccountID accountID; // "GDWNY2POLGK65VVKIH5KQSH7VWLKRTQ5M6ADLJAYC2UEHEBEARCZJWWI" string url; // "https://www.stellar.org" } array getPredefinedInflationDestinationsLocal(int sessionID); void setInflationDestinationLocal(int sessionID, AccountID accountID, AccountID destination); record InflationDestinationResultLocal { union { null, AccountID } destination; // null if destination is not set union { null, PredefinedInflationDestination } knownDestination; // set if one of the known destinations boolean self; // true if destination ID is equal to account ID } InflationDestinationResultLocal getInflationDestinationLocal(int sessionID, AccountID accountID); // airdropDetailsLocal returns a json blob of details about the current // airdrop and a json blob of content of the wallet disclaimer. If the // current airdrop has expired, it will return an expired error. record AirdropDetails { boolean isPromoted; string details; string disclaimer; } AirdropDetails airdropDetailsLocal(int sessionID); @typedef("string") record AirdropState {} record AirdropQualification { string title; string subtitle; boolean valid; } record AirdropStatus { AirdropState state; array rows; } // airdropStatusLocal returns the user's status for the current airdrop. AirdropStatus airdropStatusLocal(int sessionID); // airdropRegisterLocal registers a user for an airdrop. void airdropRegisterLocal(int sessionID, boolean register); // search by user search string array fuzzyAssetSearchLocal(int sessionID, string searchString); AssetListResult listPopularAssetsLocal(int sessionID); // Trustline operations: // In addTrustline, limit is optional, if not supplied, max limit will be used. void addTrustlineLocal(int sessionID, AccountID accountID, Trustline trustline, string limit); void deleteTrustlineLocal(int sessionID, AccountID accountID, Trustline trustline); void changeTrustlineLimitLocal(int sessionID, AccountID accountID, Trustline trustline, string limit); array getTrustlinesLocal(int sessionID, AccountID accountID); record RecipientTrustlinesLocal { array trustlines; ParticipantType recipientType; // keybase or stellar } RecipientTrustlinesLocal getTrustlinesForRecipientLocal(int sessionID, string recipient); record PaymentPathLocal { string sourceDisplay; // for display purposes string sourceMaxDisplay; string destinationDisplay; string exchangeRate; // "1 XYZ = 12.1333 ABC" string amountError; // empty if no error AccountID destinationAccount; PaymentPath fullPath; // pass this back when submitting the payment } PaymentPathLocal findPaymentPathLocal(AccountID from, string to, Asset sourceAsset, Asset destinationAsset, string amount); record AssetActionResultLocal { union { null, string } externalUrl; union { null, string } messageFromAnchor; } AssetActionResultLocal assetDepositLocal(AccountID accountID, Asset asset); AssetActionResultLocal assetWithdrawLocal(AccountID accountID, Asset asset); // ------------------------------------------------------- // CLI protocol // ------------------------------------------------------- array balancesLocal(AccountID accountID); record SendResultCLILocal { KeybaseTransactionID kbTxID; // Direct: tx ID of the payment tx // Relay : tx ID of the funding payment tx TransactionID txID; } enum PublicNoteType { NONE_0, TEXT_1, ID_2, HASH_3, RETURN_4 } SendResultCLILocal sendCLILocal(string recipient, string amount, Asset asset, string note, string displayAmount, string displayCurrency, boolean forceRelay, string publicNote, PublicNoteType publicNoteType, AccountID fromAccountID); SendResultCLILocal sendPathCLILocal(AccountID source, string recipient, PaymentPath path, string note, string publicNote, PublicNoteType publicNoteType); TransactionID accountMergeCLILocal(AccountID fromAccountID, union { null, SecretKey } fromSecretKey, string to); // Claim a relay payment // `txID` is the kbTxID of the relay payment. Can also be the txID of the funding tx. // `into` is the account into which to claim. Null will default to the user's primary account. RelayClaimResult claimCLILocal(string txID, union { null, AccountID } into); record PaymentOrErrorCLILocal { union { null, PaymentCLILocal } payment; union { null, string } err; } record PaymentCLILocal { TransactionID txID; // For relay payments, the funding tx. TimeMs time; string status; string statusDetail; string amount; Asset asset; union { null, string } displayAmount; union { null, string } displayCurrency; string sourceAmountMax; string sourceAmountActual; Asset sourceAsset; // for non-payment txs, multiple ops: boolean isAdvanced; string summaryAdvanced; // if isAdvanced is true, just show this string array operations; // string summary of each operation in the transaction AccountID fromStellar; union { null, AccountID } toStellar; union { null, string } fromUsername; union { null, string } toUsername; union { null, string } toAssertion; string note; string noteErr; boolean unread; // details string publicNote; // public memo for the payment string publicNoteType; // public memo type: "text", "id", "hash", "return" string feeChargedDescription; // "0.0000100 XLM" the actual fee that was charged for this tx (formatted) } array recentPaymentsCLILocal(union { null, AccountID } accountID); // txID can be either a keybase or stellar transaction ID. PaymentCLILocal paymentDetailCLILocal(string txID); void walletInitLocal(); Bundle walletDumpLocal(); // Account balance and its current value in selected currency. record OwnAccountCLILocal { AccountID accountID; boolean isPrimary; string name; array balance; union { null, OutsideExchangeRate } exchangeRate; AccountMode accountMode; } array walletGetAccountsCLILocal(); // Whether this account is one of this user's. boolean ownAccountLocal(AccountID accountID); void importSecretKeyLocal(SecretKey secretKey, boolean makePrimary, string name); // prompts for passphrase SecretKey exportSecretKeyLocal(AccountID accountID); void setDisplayCurrency(AccountID accountID, string currency); OutsideExchangeRate exchangeRateLocal(OutsideCurrencyCode currency); map getAvailableLocalCurrencies(); string formatLocalCurrencyString(string amount, OutsideCurrencyCode code); KeybaseRequestID makeRequestCLILocal(string recipient, union { null, Asset } asset, union { null, OutsideCurrencyCode } currency, string amount, string note); record LookupResultCLILocal { AccountID accountID; union { null, string } username; } LookupResultCLILocal lookupCLILocal(string name); record BatchPaymentError { string message; int code; } record BatchPaymentResult { string username; TimeMs startTime; TimeMs submittedTime; TimeMs endTime; TransactionID txID; PaymentStatus status; string statusDescription; union { null, BatchPaymentError } error; } record BatchResultLocal { TimeMs startTime; TimeMs preparedTime; TimeMs allSubmittedTime; TimeMs allCompleteTime; TimeMs endTime; array payments; TimeMs overallDurationMs; TimeMs prepareDurationMs; TimeMs submitDurationMs; TimeMs waitPaymentsDurationMs; TimeMs waitChatDurationMs; int countSuccess; int countDirect; int countRelay; int countError; int countPending; TimeMs avgDurationMs; TimeMs avgSuccessDurationMs; TimeMs avgDirectDurationMs; TimeMs avgRelayDurationMs; TimeMs avgErrorDurationMs; } record BatchPaymentArg { string recipient; string amount; string message; } // if useMulti is true, it will create one transaction for all the payments. // if false, it will send them in individual transactions. BatchResultLocal batchLocal(string batchID, int timeoutSecs, array payments, boolean useMulti); record TxDisplaySummary { AccountID source; int fee; string memo; string memoType; array operations; } record ValidateStellarURIResultLocal { string operation; // currently, 'pay' or 'tx' // common fields string originDomain; // required (by keybase, not by sep7) string message; // optional @lint("ignore") string callbackURL; // optional // tx fields string xdr; // required for op tx TxDisplaySummary summary; // use for displaying tx // pay fields string recipient; // required for op pay string amount; // optional string assetCode; // optional string assetIssuer; // required if assetCode exists string memo; // optional string memoType; // required if memo exists // keybase-specific pay fields string displayAmountFiat; // "$1.23 USD" (the worth of amount in user's display currency if asset being sent is XLM) string availableToSendNative; string availableToSendFiat; // Whether or not the URI was signed (used for displaying a warning banner in app) boolean signed; } ValidateStellarURIResultLocal validateStellarURILocal(int sessionID, string inputURI); TransactionID approveTxURILocal(int sessionID, string inputURI); TransactionID approvePayURILocal(int sessionID, string inputURI, string amount, boolean fromCLI); TransactionID approvePathURILocal(int sessionID, string inputURI, PaymentPath fullPath, boolean fromCLI); record PartnerUrl { string url; string title; string description; @jsonkey("icon_filename") string iconFilename; @jsonkey("admin_only") boolean adminOnly; @jsonkey("can_purchase") boolean canPurchase; string extra; // extra json tbd } array getPartnerUrlsLocal(int sessionID); // Signs arbitrary Stellar transaction. If no AccountID is provided, it's derived // from the transaction's source account. record SignXdrResult { string singedTx; AccountID accountID; // If also submitting to the network: union { null, string } submitErr; union { null, TransactionID } submitTxID; } SignXdrResult signTransactionXdrLocal(string envelopeXdr, union { null, AccountID } accountID, boolean submit); record StaticConfig { // All lengths are measured in bytes int paymentNoteMaxLength; int requestNoteMaxLength; int publicMemoMaxLength; } // TODO: consolidate this RPC with the chat `getStaticConfig` in the future StaticConfig getStaticConfigLocal(); }