@idos-network/kwil-infra 1.5.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/README.md +46 -1
  3. package/dist/actions/index.d.mts +2 -2
  4. package/dist/actions/index.mjs +1 -1370
  5. package/dist/actions/index.mjs.map +1 -1
  6. package/dist/facesign/index.d.mts +1 -1
  7. package/dist/facesign/index.mjs +1 -2
  8. package/dist/{facesign-signer-BC24j1eN.d.mts → facesign-signer-5I8juA7p.d.mts} +2 -1
  9. package/dist/facesign-signer-5I8juA7p.d.mts.map +1 -0
  10. package/dist/facesign-signer-z5T312uQ.mjs +2 -0
  11. package/dist/facesign-signer-z5T312uQ.mjs.map +1 -0
  12. package/dist/{index-iqkJfgWf.d.mts → index-Bqz6trCk.d.mts} +223 -136
  13. package/dist/index-Bqz6trCk.d.mts.map +1 -0
  14. package/dist/index.d.mts +2 -2
  15. package/dist/index.mjs +1 -429
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/signature-verification/index.d.mts +3 -4
  18. package/dist/signature-verification/index.d.mts.map +1 -1
  19. package/dist/signature-verification/index.mjs +1 -134
  20. package/dist/signature-verification/index.mjs.map +1 -1
  21. package/dist/xrp/utils.d.mts +130 -20
  22. package/dist/xrp/utils.d.mts.map +1 -1
  23. package/dist/xrp/utils.mjs +1 -104
  24. package/dist/xrp/utils.mjs.map +1 -1
  25. package/dist/xrpl-credentials/index.d.mts +6 -7
  26. package/dist/xrpl-credentials/index.d.mts.map +1 -1
  27. package/dist/xrpl-credentials/index.mjs +1 -223
  28. package/dist/xrpl-credentials/index.mjs.map +1 -1
  29. package/package.json +9 -8
  30. package/src/actions/actions.test.ts +189 -0
  31. package/src/actions/actions.ts +368 -467
  32. package/src/actions/index.ts +38 -0
  33. package/src/create-kgw-authenticated-fetch.test.ts +377 -0
  34. package/src/create-kgw-authenticated-fetch.ts +321 -0
  35. package/src/create-kwil-client.ts +33 -10
  36. package/src/create-kwil-signer.test.ts +80 -0
  37. package/src/create-kwil-signer.ts +31 -5
  38. package/src/facesign/facesign-signer.test.ts +77 -0
  39. package/src/facesign/facesign-signer.ts +50 -2
  40. package/src/index.ts +2 -0
  41. package/src/mm-token/create-mm-token-kwil-signer.test.ts +148 -0
  42. package/src/mm-token/create-mm-token-kwil-signer.ts +166 -0
  43. package/src/near/create-near-wallet-kwil-signer.ts +1 -1
  44. package/src/signature-verification/index.test.ts +18 -0
  45. package/src/signature-verification/index.ts +7 -1
  46. package/src/wait-for-kwil-tx.test.ts +92 -0
  47. package/src/wait-for-kwil-tx.ts +111 -0
  48. package/src/xrp/signer.ts +2 -1
  49. package/src/xrp/utils.ts +7 -25
  50. package/tsdown.config.ts +1 -0
  51. package/dist/facesign-signer-BC24j1eN.d.mts.map +0 -1
  52. package/dist/facesign-signer-qzCcwunk.mjs +0 -244
  53. package/dist/facesign-signer-qzCcwunk.mjs.map +0 -1
  54. package/dist/index-iqkJfgWf.d.mts.map +0 -1
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { AccountSetAsfFlags, AccountSetFlagsInterface, NFTokenCreateOfferFlagsInterface, NFTokenMintFlagsInterface, OfferCreateFlagsInterface, Path, PaymentFlagsInterface, SubmittableTransaction, TrustSetFlagsInterface } from "xrpl";
3
- import { Amount, Amount as Amount$1, IssuedCurrencyAmount } from "xrpl/dist/npm/models/common/index.js";
3
+ import { Amount, Amount as Amount$1, IssuedCurrencyAmount } from "xrpl/dist/npm/models/common";
4
4
  import { w3cwebsocket } from "websocket";
5
5
  import { EventEmitter } from "events";
6
6
  //#endregion
@@ -342,7 +342,7 @@ declare const submitTransaction: (payload: SubmitTransactionRequest) => Promise<
342
342
  //#endregion
343
343
  //#region ../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/submitBulkTransactions/submitBulkTransactions.d.ts
344
344
  declare const submitBulkTransactions: (payload: SubmitBulkTransactionsRequest) => Promise<SubmitBulkTransactionsResponse>;
345
- declare namespace index_d_exports {
345
+ declare namespace index_d_exports$1 {
346
346
  export { AcceptNFTOfferRequest, AcceptNFTOfferResponse, AccountNFToken, Amount$1 as Amount, BurnNFTRequest, BurnNFTResponse, CancelNFTOfferRequest, CancelNFTOfferResponse, CancelOfferRequest, CancelOfferResponse, CreateNFTOfferRequest, CreateNFTOfferResponse, CreateOfferRequest, CreateOfferResponse, GetAddressResponse, GetNFTRequest, GetNFTResponse, GetNetworkRequest, GetNetworkResponse, GetPublicKeyResponse, Hook, HookGrant, HookParameter, IsInstalledResponse, Memo, MintNFTRequest, MintNFTResponse, Network, PaymentFlags, SendPaymentRequest, SendPaymentResponse, SetAccountRequest, SetAccountResponse, SetHookRequest, SetHookResponse, SetRegularKeyRequest, SetRegularKeyResponse, SetTrustlineRequest, SetTrustlineResponse, SignMessageRequest, SignMessageResponse, SignTransactionRequest, SignTransactionResponse, SubmitBulkTransactionsRequest, SubmitBulkTransactionsResponse, SubmitTransactionRequest, SubmitTransactionResponse, TransactionBulkResponse, TrustSetFlags, acceptNFTOffer, burnNFT, cancelNFTOffer, cancelOffer, createNFTOffer, createOffer, getAddress, getNFT, getNetwork, getPublicKey, isInstalled, mintNFT, on, sendPayment, setAccount, setHook, setRegularKey, setTrustline, signMessage, signTransaction, submitBulkTransactions, submitTransaction };
347
347
  }
348
348
  //#endregion
@@ -474,6 +474,49 @@ interface XummDeletePayloadResponse {
474
474
  meta: XummPayloadMeta;
475
475
  custom_meta: XummCustomMeta;
476
476
  }
477
+ interface XummWebhookBody {
478
+ meta: {
479
+ url: string;
480
+ application_uuidv4: string;
481
+ payload_uuidv4: string;
482
+ opened_by_deeplink: boolean;
483
+ };
484
+ custom_meta: XummCustomMeta;
485
+ payloadResponse: {
486
+ payload_uuidv4: string;
487
+ reference_call_uuidv4: string;
488
+ signed: boolean;
489
+ user_token: boolean;
490
+ return_url: {
491
+ app: string | null;
492
+ web: string | null;
493
+ };
494
+ txid: string;
495
+ };
496
+ userToken: {
497
+ user_token: string;
498
+ token_issued: number;
499
+ token_expiration: number;
500
+ } | null;
501
+ }
502
+ interface XummWebsocketBody {
503
+ payload_uuidv4: string;
504
+ reference_call_uuidv4: string;
505
+ signed: boolean;
506
+ user_token: boolean;
507
+ return_url: {
508
+ app: string | null;
509
+ web: string | null;
510
+ };
511
+ custom_meta: XummCustomMeta;
512
+ txid: string;
513
+ }
514
+ interface XummApiError {
515
+ error: {
516
+ reference: string;
517
+ code: number;
518
+ };
519
+ }
477
520
  //#endregion
478
521
  //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/AnyJson.d.ts
479
522
  declare type AnyJson$1 = Record<string, any>;
@@ -525,6 +568,22 @@ interface PossibleKycStatuses {
525
568
  REJECTED: string;
526
569
  SUCCESSFUL: string;
527
570
  }
571
+ interface KycStatusResponse {
572
+ kycStatus: keyof PossibleKycStatuses;
573
+ possibleStatuses: PossibleKycStatuses;
574
+ }
575
+ //#endregion
576
+ //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/KycInfoResponse.d.ts
577
+ interface KycInfoResponse {
578
+ account: string;
579
+ kycApproved: boolean;
580
+ }
581
+ //#endregion
582
+ //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/Pong.d.ts
583
+ interface Pong {
584
+ pong: boolean;
585
+ auth: ApplicationDetails;
586
+ }
528
587
  //#endregion
529
588
  //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/XrplTransaction.d.ts
530
589
  interface XrplTransaction {
@@ -569,6 +628,9 @@ interface UserTokenValidity {
569
628
  issued?: number;
570
629
  expires?: number;
571
630
  }
631
+ interface UserTokenResponse {
632
+ tokens: UserTokenValidity[];
633
+ }
572
634
  //#endregion
573
635
  //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/JwtPong.d.ts
574
636
  interface JwtPong {
@@ -662,6 +724,31 @@ interface PayloadSubscription {
662
724
  websocket: w3cwebsocket;
663
725
  }
664
726
  //#endregion
727
+ //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Storage/StorageDeleteResponse.d.ts
728
+ interface StorageDeleteResponse extends StorageResponse {
729
+ stored: boolean;
730
+ data: null;
731
+ }
732
+ //#endregion
733
+ //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Storage/StorageGetResponse.d.ts
734
+ interface StorageGetResponse extends StorageResponse {
735
+ data: AnyJson$1 | null;
736
+ }
737
+ //#endregion
738
+ //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Storage/StorageResponse.d.ts
739
+ interface StorageResponse {
740
+ application: {
741
+ name: string;
742
+ uuidv4: string;
743
+ };
744
+ }
745
+ //#endregion
746
+ //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Storage/StorageSetResponse.d.ts
747
+ interface StorageSetResponse extends StorageResponse {
748
+ stored: boolean;
749
+ data: AnyJson$1;
750
+ }
751
+ //#endregion
665
752
  //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Push/EventResponse.d.ts
666
753
  interface EventResponse {
667
754
  pushed: boolean;
@@ -749,6 +836,30 @@ interface xAppJwtPong extends AnyJson$1 {
749
836
  exp: number;
750
837
  }
751
838
  //#endregion
839
+ //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/JwtUserdata.d.ts
840
+ interface JwtUserdataList extends AnyJson$1 {
841
+ operation: 'LIST';
842
+ keys: string[];
843
+ count: number;
844
+ }
845
+ interface JwtUserdataGet extends AnyJson$1 {
846
+ operation: 'RETRIEVE';
847
+ data: AnyJson$1;
848
+ keys: string[];
849
+ count: number;
850
+ }
851
+ interface JwtUserdataSet extends AnyJson$1 {
852
+ operation: 'PERSIST';
853
+ persisted: boolean;
854
+ }
855
+ interface JwtUserdataDelete extends AnyJson$1 {
856
+ operation: 'REMOVE';
857
+ persisted: boolean;
858
+ }
859
+ declare namespace index_d_exports {
860
+ export { AnyJson$1 as AnyJson, ApplicationDetails, CreatePayload, XummPostPayloadResponse as CreatedPayload, CuratedAssetsResponse, XummDeletePayloadResponse as DeletedPayload, EventPushPostBody, EventResponse, HookHash, HookHashes, JwtPong, JwtUserdataDelete, JwtUserdataGet, JwtUserdataList, JwtUserdataSet, KycInfoResponse, KycStatusResponse, NftokenDetail, PayloadAndSubscription, PayloadSubscription, Pong, PossibleKycStatuses, PushResponse, Rails, RatesResponse, StorageDeleteResponse, StorageGetResponse, StorageResponse, StorageSetResponse, SubscriptionCallbackParams, UserTokenResponse, UserTokenValidity, XrplTransaction, XrplTransactionType, XummApiError, XummCancelReason, XummCustomMeta, XummDeletePayloadResponse, XummGetPayloadResponse, XummJsonTransaction, XummGetPayloadResponse as XummPayload, XummPayloadBodyBase, XummPayloadMeta, XummPostPayloadBodyBlob, XummPostPayloadBodyJson, XummPostPayloadResponse, XummQrQuality, XummTransactionApprovalType, XummTransactionType, XummWebhookBody, XummWebsocketBody, onPayloadEvent, xAppJwtOtt, xAppJwtPong, xAppOttData };
861
+ }
862
+ //#endregion
752
863
  //#region ../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/Meta.d.ts
753
864
  declare class Meta {
754
865
  private apiKey;
@@ -1127,37 +1238,36 @@ declare class Xumm extends EventEmitter {
1127
1238
  }
1128
1239
  //#endregion
1129
1240
  //#region src/xrp/utils.d.ts
1130
- type WalletName = "XAMAN" | "GEM";
1131
- interface WalletConfig {
1241
+ export type WalletName = "XAMAN" | "GEM";
1242
+ export interface WalletConfig {
1132
1243
  name: WalletName;
1133
- instance: Xumm | typeof index_d_exports;
1244
+ instance: Xumm | typeof index_d_exports$1;
1134
1245
  }
1135
- type XamanConfig = {
1246
+ export type XamanConfig = {
1136
1247
  name: "XAMAN";
1137
1248
  instance: Xumm;
1138
1249
  };
1139
- type GemConfig = {
1250
+ export type GemConfig = {
1140
1251
  name: "GEM";
1141
- instance: typeof index_d_exports;
1252
+ instance: typeof index_d_exports$1;
1142
1253
  };
1143
- type WalletInitConfig = XamanConfig | GemConfig;
1254
+ export type WalletInitConfig = XamanConfig | GemConfig;
1144
1255
  type XrpWallet = "Xumm" | "GemWallet";
1145
- declare function createXummPayload(message: string): Record<string, unknown>;
1146
- declare function signXummTx(xummInstance: Xumm, payload: Record<string, unknown>): Promise<string>;
1147
- declare function getXummPublicKey(wallet: Xumm): Promise<string | undefined>;
1148
- declare function signGemWalletTx(gemWalletInstance: typeof index_d_exports, message: string): Promise<string | undefined>;
1149
- declare function getGemWalletPublicKey(wallet: typeof index_d_exports): Promise<{
1256
+ export declare function createXummPayload(message: string): Record<string, unknown>;
1257
+ export declare function signXummTx(xummInstance: Xumm, payload: Record<string, unknown>): Promise<string>;
1258
+ export declare function getXummPublicKey(wallet: Xumm): Promise<string | undefined>;
1259
+ export declare function signGemWalletTx(gemWalletInstance: typeof index_d_exports$1, message: string): Promise<string | undefined>;
1260
+ export declare function getGemWalletPublicKey(wallet: typeof index_d_exports$1): Promise<{
1150
1261
  address: string;
1151
1262
  publicKey: string;
1152
1263
  } | undefined>;
1153
- declare function getXrpAddress(wallet: Xumm | typeof index_d_exports): Promise<string | undefined>;
1154
- declare function looksLikeXrpWallet(wallet: unknown): wallet is Xumm | typeof index_d_exports;
1155
- declare function getXrpWalletType(object: Record<string, unknown>): Promise<XrpWallet>;
1156
- declare function getXrpTxHash(message: string | Uint8Array, wallet: Xumm | typeof index_d_exports): Promise<string | undefined>;
1157
- declare function getXrpPublicKey(wallet: Xumm | typeof index_d_exports): Promise<{
1264
+ export declare function getXrpAddress(wallet: Xumm | typeof index_d_exports$1): Promise<string | undefined>;
1265
+ export declare function looksLikeXrpWallet(wallet: unknown): wallet is Xumm | typeof index_d_exports$1;
1266
+ export declare function getXrpWalletType(object: Record<string, unknown>): Promise<XrpWallet>;
1267
+ export declare function getXrpTxHash(message: string | Uint8Array, wallet: Xumm | typeof index_d_exports$1): Promise<string | undefined>;
1268
+ export declare function getXrpPublicKey(wallet: Xumm | typeof index_d_exports$1): Promise<{
1158
1269
  address: string;
1159
1270
  publicKey: string;
1160
1271
  } | undefined>;
1161
1272
  //#endregion
1162
- export { GemConfig, WalletConfig, WalletInitConfig, WalletName, XamanConfig, createXummPayload, getGemWalletPublicKey, getXrpAddress, getXrpPublicKey, getXrpTxHash, getXrpWalletType, getXummPublicKey, looksLikeXrpWallet, signGemWalletTx, signXummTx };
1163
1273
  //# sourceMappingURL=utils.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.mts","names":[],"sources":["../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/network/network.constant.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/xrpl/hooks.types.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/xrpl/basic.types.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/xrpl/nft.types.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/payload/payload.types.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/acceptNFTOffer/acceptNFTOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/burnNFT/burnNFT.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/cancelNFTOffer/cancelNFTOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/cancelOffer/cancelOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/createNFTOffer/createNFTOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/createOffer/createOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/on/on.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/getAddress/getAddress.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/getNetwork/getNetwork.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/getNFT/getNFT.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/getPublicKey/getPublicKey.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/isInstalled/isInstalled.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/mintNFT/mintNFT.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/sendPayment/sendPayment.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/setAccount/setAccount.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/setHook/setHook.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/setRegularKey/setRegularKey.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/setTrustline/setTrustline.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/signMessage/signMessage.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/signTransaction/signTransaction.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/submitTransaction/submitTransaction.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/submitBulkTransactions/submitBulkTransactions.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/index.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/xumm-api/index.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/AnyJson.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/ApplicationDetails.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/CuratedAssetsResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/KycStatusResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/XrplTransaction.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/NftokenDetail.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/RatesResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/UserTokens.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/JwtPong.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/HookHash.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/HookHashes.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/Rails.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Payload/SubscriptionCallbackParams.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Payload/onPayloadEvent.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Payload/PayloadAndSubscription.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Payload/PayloadSubscription.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Push/EventResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Push/PushResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Push/EventPushPostBody.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/xApp/xAppOttData.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/xApp/xAppJwtOtt.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/xApp/xAppJwtPong.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/Meta.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/Storage.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/Payload.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/xApp.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/Push.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/JwtUserdata.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/index.d.ts","../../../../node_modules/.pnpm/xumm-oauth2-pkce@2.8.7_supports-color@7.2.0/node_modules/xumm-oauth2-pkce/dist/index.d.ts","../../../../node_modules/.pnpm/xumm-xapp-sdk@1.7.2_supports-color@7.2.0/node_modules/xumm-xapp-sdk/dist/types.d.ts","../../../../node_modules/.pnpm/xumm-xapp-sdk@1.7.2_supports-color@7.2.0/node_modules/xumm-xapp-sdk/dist/index.d.ts","../../../../node_modules/.pnpm/xumm@1.8.0_supports-color@7.2.0/node_modules/xumm/dist/index.d.ts","../../src/xrp/utils.ts"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],"mappings":";;;;;;;aAIoB;EAChB;EACA;EACA;EACA;;aAEgB;EAChB;EACA;EACA;;KAEQ,UAAU,cAAc;;;UCVnB;EACb;IACI;IACA;IACA;IACA;IACA;IACA,iBAAiB;IACjB,aAAa;;;UAGJ;EACb;IACI;IACA;;;UAGS;EACb;IACI;IACA;;;;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B;;UAE1B;EACb;EACA,OAAO;EACP;;UAEa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAEa;EACb;IACI;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACI;MACA;;;EAGR,cAAc;EACd;;UAEa,gCAAgC;EAC7C,QAAQ;;UAEK,gCAAgC;EAC7C;;aAEgB,gBAAgB,0BAA0B;UAC7C;EACb;EACA;IACI;IACA;;EAEJ;IACI;IACA;IACA,qBAAqB;IACrB;;EAEJ;;UAEa;EACb,MAAM;EACN;IACI;IACA;IACA;IACA;IACA;IACA;;EAEJ;IACI,SAAS,sBAAsB;IAC/B;IACA;IACA,cAAc;IACd;IACA;IACA;IACA;IACA;IACA,WAAW;;EAEf;IACI;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,gBAAgB;IAChB;;EAEJ,aAAa;;UAEA;EACb;IACI;IACA,QAAQ;;EAEZ,MAAM;EACN,aAAa;;;;aC7HG,YAAU;;;UCCb;EACb,QAAQ;EACR;IACI;IACA;IACA;IACA;;EAEJ;IACI;;EAEJ,UAAU,cAAc;;;;UCZX;EACb;EACA;EACA;KACK;MACG;MACA;MACA;MACA;MACA;MACA;SACK;UACG;UACA;UACA;UACA;UACA;UACA;;;;;;;;UCjBH;EACb;EACA;EACA;EACA;;;;UCHa;EACb;EACA;KACK;MACG;MACA;MACA;;;EAGR;EACA,aAAa;;;;UCXA;EACb;EACA;EACA;EACA;EACA;;;;UCLa;EACb;EACA;EACA;IACI;MACI;MACA;MACA;;;;;;UCPK;EACb;EACA;EACA;EACA;;;;UCJa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;UCda;EACb;EACA;EACA;IACI;IACA;IACA;;EAEJ;EACA;EACA;EACA;EACA;;;;UCXa;GACZ,eAAe;;;;UCF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,UAAU;;KAGA;EACV;EACA,iBAAiB;;KAGP,mBAAmB,cAAc;KAExC;iBAEW,kBAAkB,kBAAkB;iBAoBpC,WAAW,cAAc,MAAM,SAAS,0BAA0B;iBAW5D,iBAAiB,QAAQ,OAAO;iBA2BtC,gBACd,0BAA0B,iBAC1B,kBACC;iBAImB,sBACpB,eAAe,kBACd;EAAU;EAAiB;;iBAUR,cAAc,QAAQ,cAAc,kBAAY;iBAStD,mBAAmB,kBAAkB,UAAU,cAAc;iBAQvD,iBAAiB,QAAQ,0BAA0B,QAAQ;iBAU3D,aACpB,kBAAkB,YAClB,QAAQ,cAAc,kBACrB;iBAoCmB,gBACpB,QAAQ,cAAc,kBACrB;EAAU;EAAiB"}
1
+ {"version":3,"file":"utils.d.mts","names":[],"sources":["../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/network/network.constant.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/xrpl/hooks.types.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/xrpl/basic.types.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/xrpl/nft.types.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/_constants/payload/payload.types.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/acceptNFTOffer/acceptNFTOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/burnNFT/burnNFT.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/cancelNFTOffer/cancelNFTOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/cancelOffer/cancelOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/createNFTOffer/createNFTOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/createOffer/createOffer.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/on/on.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/getAddress/getAddress.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/getNetwork/getNetwork.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/getNFT/getNFT.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/getPublicKey/getPublicKey.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/isInstalled/isInstalled.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/mintNFT/mintNFT.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/sendPayment/sendPayment.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/setAccount/setAccount.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/setHook/setHook.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/setRegularKey/setRegularKey.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/setTrustline/setTrustline.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/signMessage/signMessage.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/signTransaction/signTransaction.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/submitTransaction/submitTransaction.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/submitBulkTransactions/submitBulkTransactions.d.ts","../../../../node_modules/.pnpm/@gemwallet+api@3.8.0/node_modules/@gemwallet/api/index.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/xumm-api/index.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/AnyJson.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/ApplicationDetails.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/CuratedAssetsResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/KycStatusResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/KycInfoResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/Pong.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/XrplTransaction.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/NftokenDetail.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/RatesResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/UserTokens.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/JwtPong.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/HookHash.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/HookHashes.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Meta/Rails.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Payload/SubscriptionCallbackParams.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Payload/onPayloadEvent.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Payload/PayloadAndSubscription.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Payload/PayloadSubscription.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Storage/StorageDeleteResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Storage/StorageGetResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Storage/StorageResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Storage/StorageSetResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Push/EventResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Push/PushResponse.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/Push/EventPushPostBody.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/xApp/xAppOttData.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/xApp/xAppJwtOtt.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/xApp/xAppJwtPong.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/JwtUserdata.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/types/index.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/Meta.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/Storage.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/Payload.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/xApp.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/Push.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/JwtUserdata.d.ts","../../../../node_modules/.pnpm/xumm-sdk@1.11.2_supports-color@7.2.0/node_modules/xumm-sdk/dist/src/index.d.ts","../../../../node_modules/.pnpm/xumm-oauth2-pkce@2.8.7_supports-color@7.2.0/node_modules/xumm-oauth2-pkce/dist/index.d.ts","../../../../node_modules/.pnpm/xumm-xapp-sdk@1.7.2_supports-color@7.2.0/node_modules/xumm-xapp-sdk/dist/types.d.ts","../../../../node_modules/.pnpm/xumm-xapp-sdk@1.7.2_supports-color@7.2.0/node_modules/xumm-xapp-sdk/dist/index.d.ts","../../../../node_modules/.pnpm/xumm@1.8.0_supports-color@7.2.0/node_modules/xumm/dist/index.d.ts","../../src/xrp/utils.ts"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69],"mappings":";;;;;;;aAIoB;EAChB;EACA;EACA;EACA;;aAEgB;EAChB;EACA;EACA;;KAEQ,UAAU,cAAc;;;UCVnB;EACb;IACI;IACA;IACA;IACA;IACA;IACA,iBAAiB;IACjB,aAAa;;;UAGJ;EACb;IACI;IACA;;;UAGS;EACb;IACI;IACA;;;;;UCpBS;EACb;IACI;IACA;IACA;;;UAGS;EACb;IACI;IACA;IACA;;;KAGI,gBAAgB;KAChB,eAAe;KACf,eAAe;KACf,sBAAsB;KACtB,kBAAkB;KAClB,mBAAmB;;;UCxBd;EACb;EACA;EACA;EACA;EACA;EACA;;UAEa;EACb,cAAc;EACd;;UAca;EACb;EACA;;;;UCpBa;EACb;;UAOa;EACb;EACA;EACA;EACA;EACA,QAAQ;EACR;EACA,UAAU;EACV;EACA;EACA;EACA;;UAEa,2BAA2B;EACxC,QAAQ;EACR;EACA;EACA;EACA,QAAQ;EACR,UAAU;EACV,aAAa;EACb,QAAQ;;UASK,4BAA4B;EACzC,aAAa;EACb;EACA;EACA,QAAQ;;UAQK,uBAAuB;EACpC,QAAQ;EACR;EACA;EACA;EACA;;UAEa,8BAA8B;EAC3C;EACA,QAAQ;EACR;EACA;EACA;EACA,QAAQ;;UAEK,8BAA8B;EAC3C;;UAEa,8BAA8B;EAC3C;EACA;EACA,mBAAmB;;UAEN,uBAAuB;EACpC;EACA;;UAEa;EACb;EACA;;UAEa;EACb;EACA;EACA;EACA;EACA;;UAEa,0BAA0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ACA;;EAEJ,aAAa;EACb;IACI;IACA;IACA;IACA;IACA;MACI;MACA;;IAEJ;;EAEJ;IACI;IACA;IACA;;;UAGS;EACb;EACA;EACA;EACA;EACA;IACI;IACA;;EAEJ,aAAa;EACb;;UAEa;EACb;IACI;IACA;;;;;aCvKY,YAAU;;;UCCb;EACb,QAAQ;EACR;IACI;IACA;IACA;IACA;;EAEJ;IACI;;EAEJ,UAAU,cAAc;;;;UCZX;EACb;EACA;EACA;KACK;MACG;MACA;MACA;MACA;MACA;MACA;SACK;UACG;UACA;UACA;UACA;UACA;UACA;;;;;;;;UCjBH;EACb;EACA;EACA;EACA;;UAEa;EACb,iBAAiB;EACjB,kBAAkB;;;;UCRL;EACb;EACA;;;;UCDa;EACb;EACA,MAAM;;;;UCFO;EACb;EACA;KACK;MACG;MACA;MACA;;;EAGR;EACA,aAAa;;;;UCXA;EACb;EACA;EACA;EACA;EACA;;;;UCLa;EACb;EACA;EACA;IACI;MACI;MACA;MACA;;;;;;UCPK;EACb;EACA;EACA;EACA;;UAEa;EACb,QAAQ;;;;UCPK;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;UCda;EACb;EACA;EACA;IACI;IACA;IACA;;EAEJ;EACA;EACA;EACA;EACA;;;;UCXa;GACZ,eAAe;;;;UCFV;EACN;EACA;;UAEM;EACN;EACA;EACA;EACA;;UAEa;GACZ;IACG;IACA;IACA;IACA;IACA;IACA,WAAW;IACX,WAAW;IACX;IACA;IACA;MACI;MACA;;;;;;UCtBK;EACb;EACA,MAAM;EACN,UAAU;EACV,SAAS;;;;aCJO,kBAAkB,sBAAsB,yCAAyC;;;UCApF,+BAA+B;EAC5C,SAAS;;;;UCAI;EACb,SAAS;EACT,UAAU;EACV,UAAU;EACV,WAAW;;;;UCLE,8BAA8B;EAC3C;EACA;;;;UCFa,2BAA2B;EACxC,MAAM;;;;UCFO;EACb;IACI;IACA;;;;;UCFS,2BAA2B;EACxC;EACA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,OAAO;wBA2BtC,gBACd,0BAA0B,mBAC1B,kBACC;wBAImB,sBACpB,eAAe,oBACd;EAAU;EAAiB;;wBAUR,cAAc,QAAQ,cAAc,oBAAY;wBAStD,mBAAmB,kBAAkB,UAAU,cAAc;wBAQvD,iBAAiB,QAAQ,0BAA0B,QAAQ;wBAU3D,aACpB,kBAAkB,YAClB,QAAQ,cAAc,oBACrB;wBAkBmB,gBACpB,QAAQ,cAAc,oBACrB;EAAU;EAAiB"}
@@ -1,105 +1,2 @@
1
- //#region src/xrp/utils.ts
2
- function createXummPayload(message) {
3
- const memoData = Buffer.from(message).toString("hex");
4
- return {
5
- custom_meta: { instruction: message },
6
- txjson: {
7
- TransactionType: "SignIn",
8
- Memos: [{ Memo: {
9
- MemoData: memoData,
10
- MemoType: Buffer.from("idOS").toString("hex")
11
- } }]
12
- }
13
- };
14
- }
15
- function signXummTx(xummInstance, payload) {
16
- return new Promise((resolve) => {
17
- xummInstance.payload?.createAndSubscribe(payload, async (event) => {
18
- if (!event.payload.response.hex) return;
19
- const hex = event.payload.response.hex;
20
- resolve(hex);
21
- });
22
- });
23
- }
24
- async function getXummPublicKey(wallet) {
25
- const txHash = await signXummTx(wallet, createXummPayload("Sign request from idOS"));
26
- let decode;
27
- try {
28
- ({decode} = await import("xrpl"));
29
- } catch {
30
- throw new Error("Missing optional peer dependency \"xrpl\". Install it to use Xumm public-key extraction.");
31
- }
32
- let decodedTx;
33
- try {
34
- decodedTx = decode(txHash);
35
- } catch {
36
- throw new Error("Failed to decode Xumm transaction payload.");
37
- }
38
- if (!decodedTx.SigningPubKey) throw new Error("SigningPubKey not found in decoded Xumm transaction.");
39
- return decodedTx.SigningPubKey;
40
- }
41
- function signGemWalletTx(gemWalletInstance, message) {
42
- return gemWalletInstance.signMessage(message).then((response) => response.result?.signedMessage);
43
- }
44
- async function getGemWalletPublicKey(wallet) {
45
- if ("isInstalled" in wallet) {
46
- await wallet.isInstalled();
47
- const { publicKey, address } = await wallet.getPublicKey().then((res) => res.result);
48
- return {
49
- address,
50
- publicKey
51
- };
52
- }
53
- }
54
- async function getXrpAddress(wallet) {
55
- if ("isInstalled" in wallet) {
56
- await wallet.isInstalled();
57
- return wallet.getAddress().then((response) => response.result?.address);
58
- }
59
- return wallet.user.account;
60
- }
61
- function looksLikeXrpWallet(wallet) {
62
- return wallet !== null && typeof wallet === "object" && ("authorize" in wallet || "isInstalled" in wallet);
63
- }
64
- async function getXrpWalletType(object) {
65
- if ("authorize" in object) return "Xumm";
66
- if ("isInstalled" in object) return "GemWallet";
67
- throw new Error("Unknown wallet type");
68
- }
69
- async function getXrpTxHash(message, wallet) {
70
- let messageString;
71
- const xrpWalletType = await getXrpWalletType(wallet);
72
- messageString = typeof message === "string" ? message : Buffer.from(message).toString("utf8");
73
- if (xrpWalletType === "Xumm") {
74
- const memoData = Buffer.from(messageString).toString("hex");
75
- const xummTx = await signXummTx(wallet, {
76
- custom_meta: { instruction: messageString },
77
- txjson: {
78
- TransactionType: "SignIn",
79
- Memos: [{ Memo: {
80
- MemoData: memoData,
81
- MemoType: Buffer.from("idOS").toString("hex")
82
- } }]
83
- }
84
- });
85
- console.log("xummTx", xummTx);
86
- } else if (xrpWalletType === "GemWallet") {
87
- const signature = await signGemWalletTx(wallet, messageString);
88
- if (!signature) throw new Error("Failed to sign transaction with GemWallet");
89
- return signature;
90
- }
91
- }
92
- async function getXrpPublicKey(wallet) {
93
- if (await getXrpWalletType(wallet) === "Xumm") {
94
- const publicKey = await getXummPublicKey(wallet);
95
- return {
96
- address: await getXrpAddress(wallet),
97
- publicKey
98
- };
99
- }
100
- return getGemWalletPublicKey(wallet);
101
- }
102
- //#endregion
103
- export { createXummPayload, getGemWalletPublicKey, getXrpAddress, getXrpPublicKey, getXrpTxHash, getXrpWalletType, getXummPublicKey, looksLikeXrpWallet, signGemWalletTx, signXummTx };
104
-
1
+ function e(e){let t=Buffer.from(e).toString(`hex`);return{custom_meta:{instruction:e},txjson:{TransactionType:`SignIn`,Memos:[{Memo:{MemoData:t,MemoType:Buffer.from(`idOS`).toString(`hex`)}}]}}}function t(e,t){return new Promise(n=>{e.payload?.createAndSubscribe(t,async e=>{if(!e.payload.response.hex)return;let t=e.payload.response.hex;n(t)})})}async function n(n){let r=await t(n,e(`Sign request from idOS`)),i;try{({decode:i}=await import(`xrpl`))}catch{throw Error(`Missing optional peer dependency "xrpl". Install it to use Xumm public-key extraction.`)}let a;try{a=i(r)}catch{throw Error(`Failed to decode Xumm transaction payload.`)}if(!a.SigningPubKey)throw Error(`SigningPubKey not found in decoded Xumm transaction.`);return a.SigningPubKey}function r(e,t){return e.signMessage(t).then(e=>e.result?.signedMessage)}async function i(e){if(`isInstalled`in e){await e.isInstalled();let{publicKey:t,address:n}=await e.getPublicKey().then(e=>e.result);return{address:n,publicKey:t}}}async function a(e){return`isInstalled`in e?(await e.isInstalled(),e.getAddress().then(e=>e.result?.address)):e.user.account}function o(e){return typeof e==`object`&&!!e&&(`authorize`in e||`isInstalled`in e)}async function s(e){if(`authorize`in e)return`Xumm`;if(`isInstalled`in e)return`GemWallet`;throw Error(`Unknown wallet type`)}async function c(e,t){let n=await s(t);if(n===`Xumm`)throw Error(`Xaman (Xumm) can't sign idOS messages; connect with GemWallet instead`);if(n===`GemWallet`){let n=await r(t,typeof e==`string`?e:Buffer.from(e).toString(`utf8`));if(!n)throw Error(`Failed to sign transaction with GemWallet`);return n}}async function l(e){if(await s(e)===`Xumm`){let t=await n(e);return{address:await a(e),publicKey:t}}return i(e)}export{e as createXummPayload,i as getGemWalletPublicKey,a as getXrpAddress,l as getXrpPublicKey,c as getXrpTxHash,s as getXrpWalletType,n as getXummPublicKey,o as looksLikeXrpWallet,r as signGemWalletTx,t as signXummTx};
105
2
  //# sourceMappingURL=utils.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","names":[],"sources":["../../src/xrp/utils.ts"],"sourcesContent":["import type * as GemWallet from \"@gemwallet/api\";\nimport type { Xumm } from \"xumm\";\nexport type WalletName = \"XAMAN\" | \"GEM\";\n\nexport interface WalletConfig {\n name: WalletName;\n instance: Xumm | typeof GemWallet;\n}\n\nexport type XamanConfig = {\n name: \"XAMAN\";\n instance: Xumm;\n};\n\nexport type GemConfig = {\n name: \"GEM\";\n instance: typeof GemWallet;\n};\n\nexport type WalletInitConfig = XamanConfig | GemConfig;\n\ntype XrpWallet = \"Xumm\" | \"GemWallet\";\n\nexport function createXummPayload(message: string): Record<string, unknown> {\n const memoData = Buffer.from(message).toString(\"hex\"); // Encode message as hex for Memos\n return {\n custom_meta: {\n instruction: message,\n },\n txjson: {\n TransactionType: \"SignIn\",\n Memos: [\n {\n Memo: {\n MemoData: memoData,\n MemoType: Buffer.from(\"idOS\").toString(\"hex\"), // Optional type identifier\n },\n },\n ],\n },\n };\n}\n\nexport function signXummTx(xummInstance: Xumm, payload: Record<string, unknown>): Promise<string> {\n return new Promise((resolve) => {\n // oxlint-disable-next-line typescript/no-explicit-any -- xumm payload type is not easy to import\n xummInstance.payload?.createAndSubscribe(payload as unknown as any, async (event) => {\n if (!event.payload.response.hex) return;\n const hex = event.payload.response.hex;\n resolve(hex);\n });\n });\n}\n\nexport async function getXummPublicKey(wallet: Xumm): Promise<string | undefined> {\n const payload = createXummPayload(\"Sign request from idOS\");\n const txHash = await signXummTx(wallet, payload);\n\n let decode: typeof import(\"xrpl\").decode;\n try {\n ({ decode } = await import(\"xrpl\"));\n } catch {\n throw new Error(\n 'Missing optional peer dependency \"xrpl\". Install it to use Xumm public-key extraction.',\n );\n }\n\n let decodedTx: { SigningPubKey?: string };\n try {\n decodedTx = decode(txHash);\n } catch {\n throw new Error(\"Failed to decode Xumm transaction payload.\");\n }\n\n if (!decodedTx.SigningPubKey) {\n throw new Error(\"SigningPubKey not found in decoded Xumm transaction.\");\n }\n\n return decodedTx.SigningPubKey;\n}\n\nexport function signGemWalletTx(\n gemWalletInstance: typeof GemWallet,\n message: string,\n): Promise<string | undefined> {\n return gemWalletInstance.signMessage(message).then((response) => response.result?.signedMessage);\n}\n\nexport async function getGemWalletPublicKey(\n wallet: typeof GemWallet,\n): Promise<{ address: string; publicKey: string } | undefined> {\n if (\"isInstalled\" in wallet) {\n await wallet.isInstalled();\n const { publicKey, address } = await wallet\n .getPublicKey()\n .then((res) => res.result as { publicKey: string; address: string });\n return { address, publicKey };\n }\n}\n\nexport async function getXrpAddress(wallet: Xumm | typeof GemWallet): Promise<string | undefined> {\n if (\"isInstalled\" in wallet) {\n await wallet.isInstalled();\n return wallet.getAddress().then((response) => response.result?.address);\n }\n return wallet.user.account;\n}\n\n// Type guard to check if the wallet is an Xumm wallet\nexport function looksLikeXrpWallet(wallet: unknown): wallet is Xumm | typeof GemWallet {\n return (\n wallet !== null &&\n typeof wallet === \"object\" &&\n (\"authorize\" in wallet || \"isInstalled\" in wallet)\n );\n}\n\nexport async function getXrpWalletType(object: Record<string, unknown>): Promise<XrpWallet> {\n if (\"authorize\" in object) {\n return \"Xumm\";\n }\n if (\"isInstalled\" in object) {\n return \"GemWallet\";\n }\n throw new Error(\"Unknown wallet type\");\n}\n\nexport async function getXrpTxHash(\n message: string | Uint8Array,\n wallet: Xumm | typeof GemWallet,\n): Promise<string | undefined> {\n let messageString: string;\n\n const xrpWalletType = await getXrpWalletType(wallet as Record<string, unknown>);\n\n messageString = typeof message === \"string\" ? message : Buffer.from(message).toString(\"utf8\"); // Decode Uint8Array to string\n if (xrpWalletType === \"Xumm\") {\n const memoData = Buffer.from(messageString).toString(\"hex\"); // Encode message as hex for Memos\n\n const payload = {\n custom_meta: {\n instruction: messageString,\n },\n txjson: {\n TransactionType: \"SignIn\",\n Memos: [\n {\n Memo: {\n MemoData: memoData,\n MemoType: Buffer.from(\"idOS\").toString(\"hex\"), // Optional type identifier\n },\n },\n ],\n },\n };\n const xummTx = await signXummTx(wallet as Xumm, payload);\n console.log(\"xummTx\", xummTx);\n } else if (xrpWalletType === \"GemWallet\") {\n const signature = await signGemWalletTx(wallet as typeof GemWallet, messageString);\n if (!signature) {\n throw new Error(\"Failed to sign transaction with GemWallet\");\n }\n return signature;\n }\n}\n\nexport async function getXrpPublicKey(\n wallet: Xumm | typeof GemWallet,\n): Promise<{ address: string; publicKey: string } | undefined> {\n const xrpWalletType = await getXrpWalletType(wallet as Record<string, unknown>);\n if (xrpWalletType === \"Xumm\") {\n // @todo: should we remove xaman wallet support?\n const publicKey = await getXummPublicKey(wallet as Xumm);\n const address = await getXrpAddress(wallet);\n return { address: address as string, publicKey: publicKey as string };\n }\n return getGemWalletPublicKey(wallet as typeof GemWallet);\n}\n"],"mappings":";AAuBA,SAAgB,kBAAkB,SAA0C;CAC1E,MAAM,WAAW,OAAO,KAAK,OAAO,CAAC,CAAC,SAAS,KAAK;CACpD,OAAO;EACL,aAAa,EACX,aAAa,QACf;EACA,QAAQ;GACN,iBAAiB;GACjB,OAAO,CACL,EACE,MAAM;IACJ,UAAU;IACV,UAAU,OAAO,KAAK,MAAM,CAAC,CAAC,SAAS,KAAK;GAC9C,EACF,CACF;EACF;CACF;AACF;AAEA,SAAgB,WAAW,cAAoB,SAAmD;CAChG,OAAO,IAAI,SAAS,YAAY;EAE9B,aAAa,SAAS,mBAAmB,SAA2B,OAAO,UAAU;GACnF,IAAI,CAAC,MAAM,QAAQ,SAAS,KAAK;GACjC,MAAM,MAAM,MAAM,QAAQ,SAAS;GACnC,QAAQ,GAAG;EACb,CAAC;CACH,CAAC;AACH;AAEA,eAAsB,iBAAiB,QAA2C;CAEhF,MAAM,SAAS,MAAM,WAAW,QADhB,kBAAkB,wBACY,CAAC;CAE/C,IAAI;CACJ,IAAI;EACF,CAAC,CAAE,UAAW,MAAM,OAAO;CAC7B,QAAQ;EACN,MAAM,IAAI,MACR,0FACF;CACF;CAEA,IAAI;CACJ,IAAI;EACF,YAAY,OAAO,MAAM;CAC3B,QAAQ;EACN,MAAM,IAAI,MAAM,4CAA4C;CAC9D;CAEA,IAAI,CAAC,UAAU,eACb,MAAM,IAAI,MAAM,sDAAsD;CAGxE,OAAO,UAAU;AAC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AI,UAAU,MAAM;CAC9B,OAAO,IAAI,kBAAkB,aAAa;EACxC,MAAM,YAAY,MAAM,gBAAgB,QAA4B,aAAa;EACjF,IAAI,CAAC,WACH,MAAM,IAAI,MAAM,2CAA2C;EAE7D,OAAO;CACT;AACF;AAEA,eAAsB,gBACpB,QAC6D;CAE7D,IAAI,MADwB,iBAAiB,MAAiC,MACxD,QAAQ;EAE5B,MAAM,YAAY,MAAM,iBAAiB,MAAc;EAEvD,OAAO;GAAE,SAAS,MADI,cAAc,MAAM;GACM;EAAoB;CACtE;CACA,OAAO,sBAAsB,MAA0B;AACzD"}
1
+ {"version":3,"file":"utils.mjs","names":[],"sources":["../../src/xrp/utils.ts"],"sourcesContent":["import type * as GemWallet from \"@gemwallet/api\";\nimport type { Xumm } from \"xumm\";\nexport type WalletName = \"XAMAN\" | \"GEM\";\n\nexport interface WalletConfig {\n name: WalletName;\n instance: Xumm | typeof GemWallet;\n}\n\nexport type XamanConfig = {\n name: \"XAMAN\";\n instance: Xumm;\n};\n\nexport type GemConfig = {\n name: \"GEM\";\n instance: typeof GemWallet;\n};\n\nexport type WalletInitConfig = XamanConfig | GemConfig;\n\ntype XrpWallet = \"Xumm\" | \"GemWallet\";\n\nexport function createXummPayload(message: string): Record<string, unknown> {\n const memoData = Buffer.from(message).toString(\"hex\"); // Encode message as hex for Memos\n return {\n custom_meta: {\n instruction: message,\n },\n txjson: {\n TransactionType: \"SignIn\",\n Memos: [\n {\n Memo: {\n MemoData: memoData,\n MemoType: Buffer.from(\"idOS\").toString(\"hex\"), // Optional type identifier\n },\n },\n ],\n },\n };\n}\n\nexport function signXummTx(xummInstance: Xumm, payload: Record<string, unknown>): Promise<string> {\n return new Promise((resolve) => {\n // oxlint-disable-next-line typescript/no-explicit-any -- xumm payload type is not easy to import\n xummInstance.payload?.createAndSubscribe(payload as unknown as any, async (event) => {\n if (!event.payload.response.hex) return;\n const hex = event.payload.response.hex;\n resolve(hex);\n });\n });\n}\n\nexport async function getXummPublicKey(wallet: Xumm): Promise<string | undefined> {\n const payload = createXummPayload(\"Sign request from idOS\");\n const txHash = await signXummTx(wallet, payload);\n\n let decode: typeof import(\"xrpl\").decode;\n try {\n ({ decode } = await import(\"xrpl\"));\n } catch {\n throw new Error(\n 'Missing optional peer dependency \"xrpl\". Install it to use Xumm public-key extraction.',\n );\n }\n\n let decodedTx: { SigningPubKey?: string };\n try {\n decodedTx = decode(txHash);\n } catch {\n throw new Error(\"Failed to decode Xumm transaction payload.\");\n }\n\n if (!decodedTx.SigningPubKey) {\n throw new Error(\"SigningPubKey not found in decoded Xumm transaction.\");\n }\n\n return decodedTx.SigningPubKey;\n}\n\nexport function signGemWalletTx(\n gemWalletInstance: typeof GemWallet,\n message: string,\n): Promise<string | undefined> {\n return gemWalletInstance.signMessage(message).then((response) => response.result?.signedMessage);\n}\n\nexport async function getGemWalletPublicKey(\n wallet: typeof GemWallet,\n): Promise<{ address: string; publicKey: string } | undefined> {\n if (\"isInstalled\" in wallet) {\n await wallet.isInstalled();\n const { publicKey, address } = await wallet\n .getPublicKey()\n .then((res) => res.result as { publicKey: string; address: string });\n return { address, publicKey };\n }\n}\n\nexport async function getXrpAddress(wallet: Xumm | typeof GemWallet): Promise<string | undefined> {\n if (\"isInstalled\" in wallet) {\n await wallet.isInstalled();\n return wallet.getAddress().then((response) => response.result?.address);\n }\n return wallet.user.account;\n}\n\n// Type guard to check if the wallet is an Xumm wallet\nexport function looksLikeXrpWallet(wallet: unknown): wallet is Xumm | typeof GemWallet {\n return (\n wallet !== null &&\n typeof wallet === \"object\" &&\n (\"authorize\" in wallet || \"isInstalled\" in wallet)\n );\n}\n\nexport async function getXrpWalletType(object: Record<string, unknown>): Promise<XrpWallet> {\n if (\"authorize\" in object) {\n return \"Xumm\";\n }\n if (\"isInstalled\" in object) {\n return \"GemWallet\";\n }\n throw new Error(\"Unknown wallet type\");\n}\n\nexport async function getXrpTxHash(\n message: string | Uint8Array,\n wallet: Xumm | typeof GemWallet,\n): Promise<string | undefined> {\n const xrpWalletType = await getXrpWalletType(wallet as Record<string, unknown>);\n if (xrpWalletType === \"Xumm\") {\n // Xaman only signs transactions; KGW's XRPL authenticator verifies a raw signature over the\n // message itself, which a signed SignIn blob can't satisfy. Fail before prompting the user.\n throw new Error(\"Xaman (Xumm) can't sign idOS messages; connect with GemWallet instead\");\n }\n if (xrpWalletType === \"GemWallet\") {\n const messageString =\n typeof message === \"string\" ? message : Buffer.from(message).toString(\"utf8\");\n const signature = await signGemWalletTx(wallet as typeof GemWallet, messageString);\n if (!signature) {\n throw new Error(\"Failed to sign transaction with GemWallet\");\n }\n return signature;\n }\n}\n\nexport async function getXrpPublicKey(\n wallet: Xumm | typeof GemWallet,\n): Promise<{ address: string; publicKey: string } | undefined> {\n const xrpWalletType = await getXrpWalletType(wallet as Record<string, unknown>);\n if (xrpWalletType === \"Xumm\") {\n // @todo: should we remove xaman wallet support?\n const publicKey = await getXummPublicKey(wallet as Xumm);\n const address = await getXrpAddress(wallet);\n return { address: address as string, publicKey: publicKey as string };\n }\n return getGemWalletPublicKey(wallet as typeof GemWallet);\n}\n"],"mappings":"AAuBA,SAAgB,EAAkB,EAA0C,CAC1E,IAAM,EAAW,OAAO,KAAK,CAAO,CAAC,CAAC,SAAS,KAAK,EACpD,MAAO,CACL,YAAa,CACX,YAAa,CACf,EACA,OAAQ,CACN,gBAAiB,SACjB,MAAO,CACL,CACE,KAAM,CACJ,SAAU,EACV,SAAU,OAAO,KAAK,MAAM,CAAC,CAAC,SAAS,KAAK,CAC9C,CACF,CACF,CACF,CACF,CACF,CAEA,SAAgB,EAAW,EAAoB,EAAmD,CAChG,OAAO,IAAI,QAAS,GAAY,CAE9B,EAAa,SAAS,mBAAmB,EAA2B,KAAO,IAAU,CACnF,GAAI,CAAC,EAAM,QAAQ,SAAS,IAAK,OACjC,IAAM,EAAM,EAAM,QAAQ,SAAS,IACnC,EAAQ,CAAG,CACb,CAAC,CACH,CAAC,CACH,CAEA,eAAsB,EAAiB,EAA2C,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,CAAC,SAAS,MAAM,CACG,EACjF,GAAI,CAAC,EACH,MAAU,MAAM,2CAA2C,EAE7D,OAAO,CACT,CACF,CAEA,eAAsB,EACpB,EAC6D,CAE7D,GAAI,MADwB,EAAiB,CAAiC,IACxD,OAAQ,CAE5B,IAAM,EAAY,MAAM,EAAiB,CAAc,EAEvD,MAAO,CAAE,QAAS,MADI,EAAc,CAAM,EACM,WAAoB,CACtE,CACA,OAAO,EAAsB,CAA0B,CACzD"}
@@ -7,7 +7,7 @@ import { TxResponse, Wallet } from "xrpl";
7
7
  * transaction on the XRP Ledger. The CredentialType field is automatically
8
8
  * encoded as a hex string from the UTF-8 representation of the credential type.
9
9
  */
10
- type CredentialAcceptPayload = {
10
+ export type CredentialAcceptPayload = {
11
11
  /** Transaction type identifier - must be "CredentialAccept" */
12
12
  TransactionType: "CredentialAccept";
13
13
  /** The issuer's XRPL address who created the Credential object */
@@ -44,7 +44,7 @@ type CredentialAcceptPayload = {
44
44
  * // }
45
45
  * ```
46
46
  */
47
- declare function OriginalCredentialAcceptPayload(issuerAddress: string, accountAddress: string, credentialType: string): CredentialAcceptPayload;
47
+ export declare function OriginalCredentialAcceptPayload(issuerAddress: string, accountAddress: string, credentialType: string): CredentialAcceptPayload;
48
48
  /**
49
49
  * Creates a copy credential acceptance payload for XRPL transactions
50
50
  *
@@ -81,13 +81,13 @@ declare function OriginalCredentialAcceptPayload(issuerAddress: string, accountA
81
81
  * // }
82
82
  * ```
83
83
  */
84
- declare function CopyCredentialAcceptPayload(copyCredentialIssuerAddress: string, accountAddress: string, originalCredentialIssuerAddress: string, credentialType: string, timelockYears: number): Promise<CredentialAcceptPayload>;
84
+ export declare function CopyCredentialAcceptPayload(copyCredentialIssuerAddress: string, accountAddress: string, originalCredentialIssuerAddress: string, credentialType: string, timelockYears: number): Promise<CredentialAcceptPayload>;
85
85
  //#endregion
86
86
  //#region src/xrpl-credentials/create.d.ts
87
87
  /**
88
88
  * Parameters for creating an original credential on XRPL
89
89
  */
90
- type CreateCredentialForOriginalParams = {
90
+ export type CreateCredentialForOriginalParams = {
91
91
  /** Unique identifier for the idOS credential, like `741a9caf-ec53-42c7-aed6-519950dcded5` */
92
92
  credId: string;
93
93
  /** Type/category of the credential, like `KYC` */
@@ -98,7 +98,7 @@ type CreateCredentialForOriginalParams = {
98
98
  /**
99
99
  * Parameters for creating a time-locked copy credential on XRPL
100
100
  */
101
- type CreateCredentialForCopyParams = {
101
+ export type CreateCredentialForCopyParams = {
102
102
  /** Unique identifier for the idOS credential */
103
103
  credId: string;
104
104
  /** Type/category of the credential */
@@ -130,7 +130,7 @@ type CreateCredentialForCopyParams = {
130
130
  * });
131
131
  * ```
132
132
  */
133
- declare class XrplCredentialsCreate {
133
+ export declare class XrplCredentialsCreate {
134
134
  #private;
135
135
  constructor(nodeUrl: string, wallet: Wallet, xrpl: typeof import("xrpl"));
136
136
  /**
@@ -185,5 +185,4 @@ declare class XrplCredentialsCreate {
185
185
  createCredentialForCopy(params: CreateCredentialForCopyParams): Promise<TxResponse>;
186
186
  }
187
187
  //#endregion
188
- export { CopyCredentialAcceptPayload, CreateCredentialForCopyParams, CreateCredentialForOriginalParams, CredentialAcceptPayload, OriginalCredentialAcceptPayload, XrplCredentialsCreate };
189
188
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/xrpl-credentials/accept.ts","../../src/xrpl-credentials/create.ts"],"mappings":";;;;;;;;;KASY;;EAEV;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8Bc,gCACd,uBACA,wBACA,yBACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiDmB,4BACpB,qCACA,wBACA,yCACA,wBACA,wBACC,QAAQ;;;;;;KCnGC;;EAEV;;EAEA;;EAEA;;;;;KAMU;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;;;;;cAuBW;;EAKX,YAAY,iBAAiB,QAAQ,QAAQ;;;;;;;SAYhC,KAAK,iBAAiB,QAAQ,SAAS,QAAQ;;;;;;;;;;;;;;;;;;;EAgC5D,4BACE,QAAQ,oCACP,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;EAmDX,wBAA8B,QAAQ,gCAAgC,QAAQ"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/xrpl-credentials/accept.ts","../../src/xrpl-credentials/create.ts"],"mappings":";;;;;;;;;YASY;;EAEV;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA8Bc,gCACd,uBACA,wBACA,yBACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAiDmB,4BACpB,qCACA,wBACA,yCACA,wBACA,wBACC,QAAQ;;;;;;YCnGC;;EAEV;;EAEA;;EAEA;;;;;YAMU;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;;;;;qBAuBW;;EAKX,YAAY,iBAAiB,QAAQ,QAAQ;;;;;;;SAYhC,KAAK,iBAAiB,QAAQ,SAAS,QAAQ;;;;;;;;;;;;;;;;;;;EAgC5D,4BACE,QAAQ,oCACP,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;EAmDX,wBAA8B,QAAQ,gCAAgC,QAAQ"}