@atxp/client 0.10.4 → 0.10.5
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.
- package/dist/_virtual/index17.js +2 -2
- package/dist/_virtual/index18.js +2 -2
- package/dist/_virtual/index19.js +2 -2
- package/dist/_virtual/index20.js +2 -2
- package/dist/_virtual/index8.js +2 -2
- package/dist/_virtual/index9.js +2 -2
- package/dist/atxpFetcher.d.ts.map +1 -1
- package/dist/atxpFetcher.js +16 -1
- package/dist/atxpFetcher.js.map +1 -1
- package/dist/index.cjs +23 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +23 -2
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
- package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
- package/dist/oAuth.d.ts +3 -1
- package/dist/oAuth.d.ts.map +1 -1
- package/dist/oAuth.js +7 -1
- package/dist/oAuth.js.map +1 -1
- package/package.json +2 -2
- package/dist/_virtual/cache.js +0 -4
- package/dist/_virtual/cache.js.map +0 -1
- package/dist/_virtual/uri.all.js +0 -4
- package/dist/_virtual/uri.all.js.map +0 -1
- package/dist/atxpAccount.d.ts +0 -20
- package/dist/atxpAccount.d.ts.map +0 -1
- package/dist/atxpAccount.js +0 -161
- package/dist/atxpAccount.js.map +0 -1
- package/dist/atxpClient.d.ts +0 -12
- package/dist/atxpLocalAccount.d.ts +0 -50
- package/dist/base.cjs +0 -34
- package/dist/base.cjs.map +0 -1
- package/dist/base.d.ts +0 -4
- package/dist/base.d.ts.map +0 -1
- package/dist/base.js +0 -5
- package/dist/base.js.map +0 -1
- package/dist/baseAccount.d.ts +0 -20
- package/dist/baseAccount.d.ts.map +0 -1
- package/dist/baseAccount.js +0 -47
- package/dist/baseAccount.js.map +0 -1
- package/dist/baseConstants.d.ts +0 -10
- package/dist/baseConstants.d.ts.map +0 -1
- package/dist/baseConstants.js +0 -21
- package/dist/baseConstants.js.map +0 -1
- package/dist/basePaymentMaker.d.ts +0 -23
- package/dist/basePaymentMaker.d.ts.map +0 -1
- package/dist/basePaymentMaker.js +0 -169
- package/dist/basePaymentMaker.js.map +0 -1
- package/dist/clientTestHelpers.d.ts +0 -6
- package/dist/destinationMakers/atxpDestinationMaker.d.ts +0 -15
- package/dist/destinationMakers/index.d.ts +0 -9
- package/dist/destinationMakers/passthroughDestinationMaker.d.ts +0 -8
- package/dist/errors.d.ts +0 -117
- package/dist/node_modules/ajv/dist/ajv.js +0 -71
- package/dist/node_modules/ajv/dist/ajv.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/codegen/code.js +0 -169
- package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/codegen/index.js +0 -712
- package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js +0 -157
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/errors.js +0 -139
- package/dist/node_modules/ajv/dist/compile/errors.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/index.js +0 -259
- package/dist/node_modules/ajv/dist/compile/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/names.js +0 -40
- package/dist/node_modules/ajv/dist/compile/names.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/ref_error.js +0 -24
- package/dist/node_modules/ajv/dist/compile/ref_error.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/resolve.js +0 -169
- package/dist/node_modules/ajv/dist/compile/resolve.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/rules.js +0 -37
- package/dist/node_modules/ajv/dist/compile/rules.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/util.js +0 -191
- package/dist/node_modules/ajv/dist/compile/util.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js +0 -30
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -64
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js +0 -219
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js +0 -48
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/index.js +0 -541
- package/dist/node_modules/ajv/dist/compile/validate/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js +0 -139
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +0 -1
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js +0 -94
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +0 -1
- package/dist/node_modules/ajv/dist/core.js +0 -642
- package/dist/node_modules/ajv/dist/core.js.map +0 -1
- package/dist/node_modules/ajv/dist/refs/data.json.js +0 -31
- package/dist/node_modules/ajv/dist/refs/data.json.js.map +0 -1
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +0 -254
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +0 -1
- package/dist/node_modules/ajv/dist/runtime/equal.js +0 -19
- package/dist/node_modules/ajv/dist/runtime/equal.js.map +0 -1
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js +0 -35
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +0 -1
- package/dist/node_modules/ajv/dist/runtime/uri.js +0 -18
- package/dist/node_modules/ajv/dist/runtime/uri.js.map +0 -1
- package/dist/node_modules/ajv/dist/runtime/validation_error.js +0 -22
- package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -62
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -121
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -35
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -24
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -108
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -101
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -79
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -71
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -66
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -45
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -38
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -73
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -89
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -24
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -69
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -51
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -25
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/code.js +0 -145
- package/dist/node_modules/ajv/dist/vocabularies/code.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js +0 -21
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js +0 -29
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +0 -139
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -120
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -20
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js +0 -33
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js +0 -104
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js +0 -18
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js +0 -29
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +0 -39
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -62
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +0 -54
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -36
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -41
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -39
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -36
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -38
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -37
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +0 -93
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +0 -1
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -79
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +0 -1
- package/dist/node_modules/ajv/lib/ajv.js +0 -531
- package/dist/node_modules/ajv/lib/ajv.js.map +0 -1
- package/dist/node_modules/ajv/lib/cache.js +0 -37
- package/dist/node_modules/ajv/lib/cache.js.map +0 -1
- package/dist/node_modules/ajv/lib/compile/async.js +0 -102
- package/dist/node_modules/ajv/lib/compile/async.js.map +0 -1
- package/dist/node_modules/ajv/lib/compile/error_classes.js +0 -46
- package/dist/node_modules/ajv/lib/compile/error_classes.js.map +0 -1
- package/dist/node_modules/ajv/lib/compile/formats.js +0 -154
- package/dist/node_modules/ajv/lib/compile/formats.js.map +0 -1
- package/dist/node_modules/ajv/lib/compile/index.js +0 -404
- package/dist/node_modules/ajv/lib/compile/index.js.map +0 -1
- package/dist/node_modules/ajv/lib/compile/resolve.js +0 -286
- package/dist/node_modules/ajv/lib/compile/resolve.js.map +0 -1
- package/dist/node_modules/ajv/lib/compile/rules.js +0 -79
- package/dist/node_modules/ajv/lib/compile/rules.js.map +0 -1
- package/dist/node_modules/ajv/lib/compile/schema_obj.js +0 -21
- package/dist/node_modules/ajv/lib/compile/schema_obj.js.map +0 -1
- package/dist/node_modules/ajv/lib/compile/ucs2length.js +0 -30
- package/dist/node_modules/ajv/lib/compile/ucs2length.js.map +0 -1
- package/dist/node_modules/ajv/lib/compile/util.js +0 -252
- package/dist/node_modules/ajv/lib/compile/util.js.map +0 -1
- package/dist/node_modules/ajv/lib/data.js +0 -59
- package/dist/node_modules/ajv/lib/data.js.map +0 -1
- package/dist/node_modules/ajv/lib/definition_schema.js +0 -49
- package/dist/node_modules/ajv/lib/definition_schema.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/_limit.js +0 -173
- package/dist/node_modules/ajv/lib/dotjs/_limit.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/_limitItems.js +0 -90
- package/dist/node_modules/ajv/lib/dotjs/_limitItems.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/_limitLength.js +0 -95
- package/dist/node_modules/ajv/lib/dotjs/_limitLength.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js +0 -90
- package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/allOf.js +0 -52
- package/dist/node_modules/ajv/lib/dotjs/allOf.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/anyOf.js +0 -83
- package/dist/node_modules/ajv/lib/dotjs/anyOf.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/comment.js +0 -24
- package/dist/node_modules/ajv/lib/dotjs/comment.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/const.js +0 -62
- package/dist/node_modules/ajv/lib/dotjs/const.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/contains.js +0 -91
- package/dist/node_modules/ajv/lib/dotjs/contains.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/custom.js +0 -238
- package/dist/node_modules/ajv/lib/dotjs/custom.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/dependencies.js +0 -178
- package/dist/node_modules/ajv/lib/dotjs/dependencies.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/enum.js +0 -72
- package/dist/node_modules/ajv/lib/dotjs/enum.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/format.js +0 -160
- package/dist/node_modules/ajv/lib/dotjs/format.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/if.js +0 -113
- package/dist/node_modules/ajv/lib/dotjs/if.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/index.js +0 -68
- package/dist/node_modules/ajv/lib/dotjs/index.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/items.js +0 -150
- package/dist/node_modules/ajv/lib/dotjs/items.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/multipleOf.js +0 -90
- package/dist/node_modules/ajv/lib/dotjs/multipleOf.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/not.js +0 -94
- package/dist/node_modules/ajv/lib/dotjs/not.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/oneOf.js +0 -83
- package/dist/node_modules/ajv/lib/dotjs/oneOf.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/pattern.js +0 -85
- package/dist/node_modules/ajv/lib/dotjs/pattern.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/properties.js +0 -345
- package/dist/node_modules/ajv/lib/dotjs/properties.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/propertyNames.js +0 -91
- package/dist/node_modules/ajv/lib/dotjs/propertyNames.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/ref.js +0 -134
- package/dist/node_modules/ajv/lib/dotjs/ref.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/required.js +0 -276
- package/dist/node_modules/ajv/lib/dotjs/required.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js +0 -96
- package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js.map +0 -1
- package/dist/node_modules/ajv/lib/dotjs/validate.js +0 -492
- package/dist/node_modules/ajv/lib/dotjs/validate.js.map +0 -1
- package/dist/node_modules/ajv/lib/keyword.js +0 -159
- package/dist/node_modules/ajv/lib/keyword.js.map +0 -1
- package/dist/node_modules/ajv/lib/refs/data.json.js +0 -33
- package/dist/node_modules/ajv/lib/refs/data.json.js.map +0 -1
- package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js +0 -254
- package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js.map +0 -1
- package/dist/node_modules/fast-json-stable-stringify/index.js +0 -69
- package/dist/node_modules/fast-json-stable-stringify/index.js.map +0 -1
- package/dist/node_modules/json-schema-traverse/index.js +0 -104
- package/dist/node_modules/json-schema-traverse/index.js.map +0 -1
- package/dist/node_modules/uri-js/dist/es5/uri.all.js +0 -1418
- package/dist/node_modules/uri-js/dist/es5/uri.all.js.map +0 -1
- package/dist/node_modules/zod/v3/ZodError.js +0 -133
- package/dist/node_modules/zod/v3/ZodError.js.map +0 -1
- package/dist/node_modules/zod/v3/errors.js +0 -9
- package/dist/node_modules/zod/v3/errors.js.map +0 -1
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -9
- package/dist/node_modules/zod/v3/helpers/errorUtil.js.map +0 -1
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -112
- package/dist/node_modules/zod/v3/helpers/parseUtil.js.map +0 -1
- package/dist/node_modules/zod/v3/helpers/util.js +0 -136
- package/dist/node_modules/zod/v3/helpers/util.js.map +0 -1
- package/dist/node_modules/zod/v3/locales/en.js +0 -112
- package/dist/node_modules/zod/v3/locales/en.js.map +0 -1
- package/dist/node_modules/zod/v3/types.js +0 -3491
- package/dist/node_modules/zod/v3/types.js.map +0 -1
- package/dist/polygon.cjs +0 -39
- package/dist/polygon.cjs.map +0 -1
- package/dist/polygon.d.ts +0 -1
- package/dist/polygon.d.ts.map +0 -1
- package/dist/polygon.js +0 -2
- package/dist/polygon.js.map +0 -1
- package/dist/polygonConstants.d.ts +0 -53
- package/dist/setup.expo.d.ts +0 -2
- package/dist/solana.cjs +0 -20
- package/dist/solana.cjs.map +0 -1
- package/dist/solana.d.ts +0 -2
- package/dist/solana.d.ts.map +0 -1
- package/dist/solana.js +0 -3
- package/dist/solana.js.map +0 -1
- package/dist/solanaAccount.d.ts +0 -13
- package/dist/solanaAccount.d.ts.map +0 -1
- package/dist/solanaAccount.js +0 -34
- package/dist/solanaAccount.js.map +0 -1
- package/dist/solanaPaymentMaker.d.ts +0 -25
- package/dist/solanaPaymentMaker.d.ts.map +0 -1
- package/dist/solanaPaymentMaker.js +0 -108
- package/dist/solanaPaymentMaker.js.map +0 -1
- package/dist/types.d.ts +0 -75
- package/dist/types.js +0 -152
- package/dist/types.js.map +0 -1
- package/dist/world.cjs +0 -39
- package/dist/world.cjs.map +0 -1
- package/dist/world.d.ts +0 -1
- package/dist/world.d.ts.map +0 -1
- package/dist/world.js +0 -2
- package/dist/world.js.map +0 -1
- package/dist/worldConstants.d.ts +0 -53
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { PaymentMaker } from './types.js';
|
|
2
|
-
import { Logger, Currency, AccountId, PaymentIdentifier, Destination } from '@atxp/common';
|
|
3
|
-
import { WalletClient, PublicActions } from "viem";
|
|
4
|
-
type ExtendedWalletClient = WalletClient & PublicActions;
|
|
5
|
-
export declare class BasePaymentMaker implements PaymentMaker {
|
|
6
|
-
protected signingClient: ExtendedWalletClient;
|
|
7
|
-
protected logger: Logger;
|
|
8
|
-
constructor(baseRPCUrl: string, walletClient: WalletClient, logger?: Logger);
|
|
9
|
-
getSourceAddress(_params: {
|
|
10
|
-
amount: BigNumber;
|
|
11
|
-
currency: Currency;
|
|
12
|
-
receiver: string;
|
|
13
|
-
memo: string;
|
|
14
|
-
}): string;
|
|
15
|
-
generateJWT({ paymentRequestId, codeChallenge, accountId }: {
|
|
16
|
-
paymentRequestId: string;
|
|
17
|
-
codeChallenge: string;
|
|
18
|
-
accountId?: AccountId | null;
|
|
19
|
-
}): Promise<string>;
|
|
20
|
-
makePayment(destinations: Destination[], _memo: string, _paymentRequestId?: string): Promise<PaymentIdentifier | null>;
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=basePaymentMaker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basePaymentMaker.d.ts","sourceRoot":"","sources":["../src/basePaymentMaker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAO,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3F,OAAO,EAKL,YAAY,EACZ,aAAa,EACd,MAAM,MAAM,CAAC;AAMd,KAAK,oBAAoB,GAAG,YAAY,GAAG,aAAa,CAAC;AA6CzD,qBAAa,gBAAiB,YAAW,YAAY;IACnD,SAAS,CAAC,aAAa,EAAE,oBAAoB,CAAC;IAC9C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEb,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,MAAM;IAe3E,gBAAgB,CAAC,OAAO,EAAE;QAAC,MAAM,EAAE,SAAS,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,MAAM;IAIpG,WAAW,CAAC,EAAC,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAC,EAAE;QAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;KAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAsC3J,WAAW,CAAC,YAAY,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;CAmF7H"}
|
package/dist/basePaymentMaker.js
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { PaymentNetworkError, InsufficientFundsError } from './types.js';
|
|
2
|
-
import { ConsoleLogger } from '@atxp/common';
|
|
3
|
-
import { publicActions, encodeFunctionData, parseEther } from 'viem';
|
|
4
|
-
import { base } from 'viem/chains';
|
|
5
|
-
import { BigNumber } from 'bignumber.js';
|
|
6
|
-
import { USDC_CONTRACT_ADDRESS_BASE } from './baseConstants.js';
|
|
7
|
-
|
|
8
|
-
// Helper function to convert to base64url that works in both Node.js and browsers
|
|
9
|
-
function toBase64Url(data) {
|
|
10
|
-
// Convert string to base64
|
|
11
|
-
const base64 = typeof Buffer !== 'undefined'
|
|
12
|
-
? Buffer.from(data).toString('base64')
|
|
13
|
-
: btoa(data);
|
|
14
|
-
// Convert base64 to base64url
|
|
15
|
-
return base64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
|
|
16
|
-
}
|
|
17
|
-
const USDC_DECIMALS = 6;
|
|
18
|
-
const ERC20_ABI = [
|
|
19
|
-
{
|
|
20
|
-
constant: false,
|
|
21
|
-
inputs: [
|
|
22
|
-
{ name: "_to", type: "address" },
|
|
23
|
-
{ name: "_value", type: "uint256" },
|
|
24
|
-
],
|
|
25
|
-
name: "transfer",
|
|
26
|
-
outputs: [{ name: "", type: "bool" }],
|
|
27
|
-
type: "function",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"constant": true,
|
|
31
|
-
"inputs": [
|
|
32
|
-
{
|
|
33
|
-
"name": "_owner",
|
|
34
|
-
"type": "address"
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
"name": "balanceOf",
|
|
38
|
-
"outputs": [
|
|
39
|
-
{
|
|
40
|
-
"name": "balance",
|
|
41
|
-
"type": "uint256"
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
"payable": false,
|
|
45
|
-
"stateMutability": "view",
|
|
46
|
-
"type": "function"
|
|
47
|
-
}
|
|
48
|
-
];
|
|
49
|
-
class BasePaymentMaker {
|
|
50
|
-
constructor(baseRPCUrl, walletClient, logger) {
|
|
51
|
-
if (!baseRPCUrl) {
|
|
52
|
-
throw new Error('baseRPCUrl was empty');
|
|
53
|
-
}
|
|
54
|
-
if (!walletClient) {
|
|
55
|
-
throw new Error('walletClient was empty');
|
|
56
|
-
}
|
|
57
|
-
if (!walletClient.account) {
|
|
58
|
-
throw new Error('walletClient.account was empty');
|
|
59
|
-
}
|
|
60
|
-
this.signingClient = walletClient.extend(publicActions);
|
|
61
|
-
this.logger = logger ?? new ConsoleLogger();
|
|
62
|
-
}
|
|
63
|
-
getSourceAddress(_params) {
|
|
64
|
-
return this.signingClient.account.address;
|
|
65
|
-
}
|
|
66
|
-
async generateJWT({ paymentRequestId, codeChallenge, accountId }) {
|
|
67
|
-
const headerObj = { alg: 'ES256K' };
|
|
68
|
-
const payloadObj = {
|
|
69
|
-
sub: this.signingClient.account.address,
|
|
70
|
-
iss: 'accounts.atxp.ai',
|
|
71
|
-
aud: 'https://auth.atxp.ai',
|
|
72
|
-
iat: Math.floor(Date.now() / 1000),
|
|
73
|
-
exp: Math.floor(Date.now() / 1000) + 60 * 60,
|
|
74
|
-
...(codeChallenge ? { code_challenge: codeChallenge } : {}),
|
|
75
|
-
...(paymentRequestId ? { payment_request_id: paymentRequestId } : {}),
|
|
76
|
-
...(accountId ? { account_id: accountId } : {}),
|
|
77
|
-
};
|
|
78
|
-
const header = toBase64Url(JSON.stringify(headerObj));
|
|
79
|
-
const payload = toBase64Url(JSON.stringify(payloadObj));
|
|
80
|
-
const message = `${header}.${payload}`;
|
|
81
|
-
const messageBytes = typeof Buffer !== 'undefined'
|
|
82
|
-
? Buffer.from(message, 'utf8')
|
|
83
|
-
: new TextEncoder().encode(message);
|
|
84
|
-
const signResult = await this.signingClient.signMessage({
|
|
85
|
-
account: this.signingClient.account,
|
|
86
|
-
message: { raw: messageBytes },
|
|
87
|
-
});
|
|
88
|
-
// For ES256K, signature is typically 65 bytes (r,s,v)
|
|
89
|
-
// Server expects the hex signature string (with 0x prefix) to be base64url encoded
|
|
90
|
-
// This creates: base64url("0x6eb2565...") not base64url(rawBytes)
|
|
91
|
-
// Pass the hex string directly to toBase64Url which will UTF-8 encode and base64url it
|
|
92
|
-
const signature = toBase64Url(signResult);
|
|
93
|
-
const jwt = `${header}.${payload}.${signature}`;
|
|
94
|
-
this.logger.info(`Generated ES256K JWT: ${jwt}`);
|
|
95
|
-
return jwt;
|
|
96
|
-
}
|
|
97
|
-
async makePayment(destinations, _memo, _paymentRequestId) {
|
|
98
|
-
// Filter to base chain destinations
|
|
99
|
-
const baseDestinations = destinations.filter(d => d.chain === 'base');
|
|
100
|
-
if (baseDestinations.length === 0) {
|
|
101
|
-
this.logger.debug('BasePaymentMaker: No base destinations found, cannot handle payment');
|
|
102
|
-
return null; // Cannot handle these destinations
|
|
103
|
-
}
|
|
104
|
-
// Pick first base destination
|
|
105
|
-
const dest = baseDestinations[0];
|
|
106
|
-
const amount = dest.amount;
|
|
107
|
-
const currency = dest.currency;
|
|
108
|
-
const receiver = dest.address;
|
|
109
|
-
if (currency.toUpperCase() !== 'USDC') {
|
|
110
|
-
throw new PaymentNetworkError('Only USDC currency is supported; received ' + currency);
|
|
111
|
-
}
|
|
112
|
-
this.logger.info(`Making payment of ${amount} ${currency} to ${receiver} on Base from ${this.signingClient.account.address}`);
|
|
113
|
-
try {
|
|
114
|
-
// Check balance before attempting payment
|
|
115
|
-
const balanceRaw = await this.signingClient.readContract({
|
|
116
|
-
address: USDC_CONTRACT_ADDRESS_BASE,
|
|
117
|
-
abi: ERC20_ABI,
|
|
118
|
-
functionName: 'balanceOf',
|
|
119
|
-
args: [this.signingClient.account.address],
|
|
120
|
-
});
|
|
121
|
-
const balance = new BigNumber(balanceRaw.toString()).dividedBy(10 ** USDC_DECIMALS);
|
|
122
|
-
if (balance.lt(amount)) {
|
|
123
|
-
this.logger.warn(`Insufficient ${currency} balance for payment. Required: ${amount}, Available: ${balance}`);
|
|
124
|
-
throw new InsufficientFundsError(currency, amount, balance, 'base');
|
|
125
|
-
}
|
|
126
|
-
// Convert amount to USDC units (6 decimals) as BigInt
|
|
127
|
-
const amountInUSDCUnits = BigInt(amount.multipliedBy(10 ** USDC_DECIMALS).toFixed(0));
|
|
128
|
-
const data = encodeFunctionData({
|
|
129
|
-
abi: ERC20_ABI,
|
|
130
|
-
functionName: "transfer",
|
|
131
|
-
args: [receiver, amountInUSDCUnits],
|
|
132
|
-
});
|
|
133
|
-
const hash = await this.signingClient.sendTransaction({
|
|
134
|
-
chain: base,
|
|
135
|
-
account: this.signingClient.account,
|
|
136
|
-
to: USDC_CONTRACT_ADDRESS_BASE,
|
|
137
|
-
data: data,
|
|
138
|
-
value: parseEther('0'),
|
|
139
|
-
maxPriorityFeePerGas: parseEther('0.000000001')
|
|
140
|
-
});
|
|
141
|
-
// Wait for transaction confirmation with more blocks to ensure propagation
|
|
142
|
-
this.logger.info(`Waiting for transaction confirmation: ${hash}`);
|
|
143
|
-
const receipt = await this.signingClient.waitForTransactionReceipt({
|
|
144
|
-
hash: hash,
|
|
145
|
-
confirmations: 1
|
|
146
|
-
});
|
|
147
|
-
if (receipt.status === 'reverted') {
|
|
148
|
-
throw new PaymentNetworkError(`Transaction reverted: ${hash}`, new Error('Transaction reverted on chain'));
|
|
149
|
-
}
|
|
150
|
-
this.logger.info(`Transaction confirmed: ${hash} in block ${receipt.blockNumber}`);
|
|
151
|
-
// Return payment result with chain and currency
|
|
152
|
-
return {
|
|
153
|
-
transactionId: hash,
|
|
154
|
-
chain: 'base',
|
|
155
|
-
currency: 'USDC'
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
catch (error) {
|
|
159
|
-
if (error instanceof InsufficientFundsError || error instanceof PaymentNetworkError) {
|
|
160
|
-
throw error;
|
|
161
|
-
}
|
|
162
|
-
// Wrap other errors in PaymentNetworkError
|
|
163
|
-
throw new PaymentNetworkError(`Payment failed on Base network: ${error.message}`, error);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export { BasePaymentMaker };
|
|
169
|
-
//# sourceMappingURL=basePaymentMaker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basePaymentMaker.js","sources":["../src/basePaymentMaker.ts"],"sourcesContent":[null],"names":["PaymentNetworkErrorClass","InsufficientFundsErrorClass"],"mappings":";;;;;;;AAmBA;AACA,SAAS,WAAW,CAAC,IAAY,EAAA;;AAE/B,IAAA,MAAM,MAAM,GAAG,OAAO,MAAM,KAAK;UAC7B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ;AACrC,UAAE,IAAI,CAAC,IAAI,CAAC;;IA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C,CAAA,gCAAA,EAAoC,KAAe,CAAC,OAAO,CAAA,CAAE,EAAE,KAAc,CAAC;QACnH;IACF;AAED;;;;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FetchMock } from 'fetch-mock';
|
|
2
|
-
export declare function mockResourceServer(mock: FetchMock, baseUrl?: string, resourcePath?: string, authServerUrl?: string): FetchMock;
|
|
3
|
-
export declare function mockAuthorizationServer(mock: FetchMock, baseUrl?: string, paymentRequests?: {
|
|
4
|
-
[key: string]: BigNumber;
|
|
5
|
-
}): FetchMock;
|
|
6
|
-
//# sourceMappingURL=clientTestHelpers.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FetchLike, Logger, Source } from '@atxp/common';
|
|
2
|
-
import { Destination, PaymentRequestOption, DestinationMaker } from '@atxp/common';
|
|
3
|
-
/**
|
|
4
|
-
* Destination mapper for ATXP network destinations.
|
|
5
|
-
* Converts destinations with network='atxp' to actual blockchain network destinations
|
|
6
|
-
* by resolving the account ID to its associated blockchain addresses.
|
|
7
|
-
*/
|
|
8
|
-
export declare class ATXPDestinationMaker implements DestinationMaker {
|
|
9
|
-
private accountsServiceUrl;
|
|
10
|
-
private fetchFn;
|
|
11
|
-
constructor(accountsServiceUrl: string, fetchFn?: FetchLike);
|
|
12
|
-
makeDestinations(option: PaymentRequestOption, logger: Logger, paymentRequestId: string, sources: Source[]): Promise<Destination[]>;
|
|
13
|
-
private getDestinations;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=atxpDestinationMaker.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Network, DestinationMaker, FetchLike } from '@atxp/common';
|
|
2
|
-
export { ATXPDestinationMaker } from './atxpDestinationMaker.js';
|
|
3
|
-
export { PassthroughDestinationMaker } from './passthroughDestinationMaker.js';
|
|
4
|
-
export interface DestinationMakerFactoryConfig {
|
|
5
|
-
atxpAccountsServer: string;
|
|
6
|
-
fetchFn?: FetchLike;
|
|
7
|
-
}
|
|
8
|
-
export declare function createDestinationMakers(config: DestinationMakerFactoryConfig): Map<Network, DestinationMaker>;
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Logger, Source } from '@atxp/common';
|
|
2
|
-
import { Network, Destination, PaymentRequestOption, DestinationMaker } from '@atxp/common';
|
|
3
|
-
export declare class PassthroughDestinationMaker implements DestinationMaker {
|
|
4
|
-
private network;
|
|
5
|
-
constructor(network: Network);
|
|
6
|
-
makeDestinations(option: PaymentRequestOption, _logger: Logger, _paymentRequestId: string, _sources: Source[]): Promise<Destination[]>;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=passthroughDestinationMaker.d.ts.map
|
package/dist/errors.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { Currency } from "@atxp/common";
|
|
2
|
-
/**
|
|
3
|
-
* Base class for all ATXP payment errors with structured error codes and actionable guidance
|
|
4
|
-
*/
|
|
5
|
-
export declare abstract class ATXPPaymentError extends Error {
|
|
6
|
-
readonly context?: Record<string, unknown> | undefined;
|
|
7
|
-
abstract readonly code: string;
|
|
8
|
-
abstract readonly retryable: boolean;
|
|
9
|
-
abstract readonly actionableMessage: string;
|
|
10
|
-
constructor(message: string, context?: Record<string, unknown> | undefined);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Thrown when the user's wallet has insufficient funds for a payment
|
|
14
|
-
*/
|
|
15
|
-
export declare class InsufficientFundsError extends ATXPPaymentError {
|
|
16
|
-
readonly currency: Currency;
|
|
17
|
-
readonly required: BigNumber;
|
|
18
|
-
readonly available?: BigNumber | undefined;
|
|
19
|
-
readonly network?: string | undefined;
|
|
20
|
-
readonly code = "INSUFFICIENT_FUNDS";
|
|
21
|
-
readonly retryable = true;
|
|
22
|
-
readonly actionableMessage: string;
|
|
23
|
-
constructor(currency: Currency, required: BigNumber, available?: BigNumber | undefined, network?: string | undefined);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Thrown when a blockchain transaction is reverted
|
|
27
|
-
*/
|
|
28
|
-
export declare class TransactionRevertedError extends ATXPPaymentError {
|
|
29
|
-
readonly transactionHash: string;
|
|
30
|
-
readonly network: string;
|
|
31
|
-
readonly revertReason?: string | undefined;
|
|
32
|
-
readonly code = "TRANSACTION_REVERTED";
|
|
33
|
-
readonly retryable = false;
|
|
34
|
-
readonly actionableMessage: string;
|
|
35
|
-
constructor(transactionHash: string, network: string, revertReason?: string | undefined);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Thrown when an unsupported currency is requested
|
|
39
|
-
*/
|
|
40
|
-
export declare class UnsupportedCurrencyError extends ATXPPaymentError {
|
|
41
|
-
readonly currency: string;
|
|
42
|
-
readonly network: string;
|
|
43
|
-
readonly supportedCurrencies: string[];
|
|
44
|
-
readonly code = "UNSUPPORTED_CURRENCY";
|
|
45
|
-
readonly retryable = false;
|
|
46
|
-
readonly actionableMessage: string;
|
|
47
|
-
constructor(currency: string, network: string, supportedCurrencies: string[]);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Thrown when gas estimation fails for a transaction
|
|
51
|
-
*/
|
|
52
|
-
export declare class GasEstimationError extends ATXPPaymentError {
|
|
53
|
-
readonly network: string;
|
|
54
|
-
readonly reason?: string | undefined;
|
|
55
|
-
readonly code = "GAS_ESTIMATION_FAILED";
|
|
56
|
-
readonly retryable = true;
|
|
57
|
-
readonly actionableMessage = "Unable to estimate gas for this transaction. Ensure you have sufficient funds for both the payment amount and gas fees, then try again.";
|
|
58
|
-
constructor(network: string, reason?: string | undefined);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Thrown when RPC/network connectivity fails
|
|
62
|
-
*/
|
|
63
|
-
export declare class RpcError extends ATXPPaymentError {
|
|
64
|
-
readonly network: string;
|
|
65
|
-
readonly rpcUrl?: string | undefined;
|
|
66
|
-
readonly originalError?: Error | undefined;
|
|
67
|
-
readonly code = "RPC_ERROR";
|
|
68
|
-
readonly retryable = true;
|
|
69
|
-
readonly actionableMessage = "Unable to connect to the blockchain network. Please check your internet connection and try again.";
|
|
70
|
-
constructor(network: string, rpcUrl?: string | undefined, originalError?: Error | undefined);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Thrown when the user rejects a transaction in their wallet
|
|
74
|
-
*/
|
|
75
|
-
export declare class UserRejectedError extends ATXPPaymentError {
|
|
76
|
-
readonly network: string;
|
|
77
|
-
readonly code = "USER_REJECTED";
|
|
78
|
-
readonly retryable = true;
|
|
79
|
-
readonly actionableMessage = "You cancelled the transaction. To complete the payment, please approve the transaction in your wallet.";
|
|
80
|
-
constructor(network: string);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Thrown when the payment server returns an error
|
|
84
|
-
*/
|
|
85
|
-
export declare class PaymentServerError extends ATXPPaymentError {
|
|
86
|
-
readonly statusCode: number;
|
|
87
|
-
readonly endpoint: string;
|
|
88
|
-
readonly serverMessage?: string | undefined;
|
|
89
|
-
readonly details?: unknown | undefined;
|
|
90
|
-
readonly code: string;
|
|
91
|
-
readonly retryable = true;
|
|
92
|
-
readonly actionableMessage = "The payment server encountered an error. Please try again in a few moments.";
|
|
93
|
-
constructor(statusCode: number, endpoint: string, serverMessage?: string | undefined, errorCode?: string, details?: unknown | undefined);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Thrown when a payment request has expired
|
|
97
|
-
*/
|
|
98
|
-
export declare class PaymentExpiredError extends ATXPPaymentError {
|
|
99
|
-
readonly paymentRequestId: string;
|
|
100
|
-
readonly expiresAt?: Date | undefined;
|
|
101
|
-
readonly code = "PAYMENT_EXPIRED";
|
|
102
|
-
readonly retryable = false;
|
|
103
|
-
readonly actionableMessage = "This payment request has expired. Please make a new request to the service.";
|
|
104
|
-
constructor(paymentRequestId: string, expiresAt?: Date | undefined);
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Generic network error for backward compatibility and uncategorized errors
|
|
108
|
-
*/
|
|
109
|
-
export declare class PaymentNetworkError extends ATXPPaymentError {
|
|
110
|
-
readonly network: string;
|
|
111
|
-
readonly originalError?: Error | undefined;
|
|
112
|
-
readonly code = "NETWORK_ERROR";
|
|
113
|
-
readonly retryable = true;
|
|
114
|
-
readonly actionableMessage = "A network error occurred during payment processing. Please try again.";
|
|
115
|
-
constructor(network: string, message: string, originalError?: Error | undefined);
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { __module as ajv } from '../../../_virtual/ajv2.js';
|
|
2
|
-
import { __require as requireCore } from './core.js';
|
|
3
|
-
import { __require as requireDraft7 } from './vocabularies/draft7.js';
|
|
4
|
-
import { __require as requireDiscriminator } from './vocabularies/discriminator/index.js';
|
|
5
|
-
import require$$3 from './refs/json-schema-draft-07.json.js';
|
|
6
|
-
import { __require as requireValidate } from './compile/validate/index.js';
|
|
7
|
-
import { __require as requireCodegen } from './compile/codegen/index.js';
|
|
8
|
-
import { __require as requireValidation_error } from './runtime/validation_error.js';
|
|
9
|
-
import { __require as requireRef_error } from './compile/ref_error.js';
|
|
10
|
-
|
|
11
|
-
var hasRequiredAjv;
|
|
12
|
-
|
|
13
|
-
function requireAjv () {
|
|
14
|
-
if (hasRequiredAjv) return ajv.exports;
|
|
15
|
-
hasRequiredAjv = 1;
|
|
16
|
-
(function (module, exports$1) {
|
|
17
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
18
|
-
exports$1.MissingRefError = exports$1.ValidationError = exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = exports$1.Ajv = void 0;
|
|
19
|
-
const core_1 = requireCore();
|
|
20
|
-
const draft7_1 = requireDraft7();
|
|
21
|
-
const discriminator_1 = requireDiscriminator();
|
|
22
|
-
const draft7MetaSchema = require$$3;
|
|
23
|
-
const META_SUPPORT_DATA = ["/properties"];
|
|
24
|
-
const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
|
|
25
|
-
class Ajv extends core_1.default {
|
|
26
|
-
_addVocabularies() {
|
|
27
|
-
super._addVocabularies();
|
|
28
|
-
draft7_1.default.forEach((v) => this.addVocabulary(v));
|
|
29
|
-
if (this.opts.discriminator)
|
|
30
|
-
this.addKeyword(discriminator_1.default);
|
|
31
|
-
}
|
|
32
|
-
_addDefaultMetaSchema() {
|
|
33
|
-
super._addDefaultMetaSchema();
|
|
34
|
-
if (!this.opts.meta)
|
|
35
|
-
return;
|
|
36
|
-
const metaSchema = this.opts.$data
|
|
37
|
-
? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA)
|
|
38
|
-
: draft7MetaSchema;
|
|
39
|
-
this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
|
|
40
|
-
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
|
41
|
-
}
|
|
42
|
-
defaultMeta() {
|
|
43
|
-
return (this.opts.defaultMeta =
|
|
44
|
-
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports$1.Ajv = Ajv;
|
|
48
|
-
module.exports = exports$1 = Ajv;
|
|
49
|
-
module.exports.Ajv = Ajv;
|
|
50
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
51
|
-
exports$1.default = Ajv;
|
|
52
|
-
var validate_1 = requireValidate();
|
|
53
|
-
Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
54
|
-
var codegen_1 = requireCodegen();
|
|
55
|
-
Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } });
|
|
56
|
-
Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } });
|
|
57
|
-
Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
58
|
-
Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
|
|
59
|
-
Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
|
|
60
|
-
Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
61
|
-
var validation_error_1 = requireValidation_error();
|
|
62
|
-
Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
|
|
63
|
-
var ref_error_1 = requireRef_error();
|
|
64
|
-
Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
|
|
65
|
-
|
|
66
|
-
} (ajv, ajv.exports));
|
|
67
|
-
return ajv.exports;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export { requireAjv as __require };
|
|
71
|
-
//# sourceMappingURL=ajv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ajv.js","sources":["../../../../../../node_modules/ajv/dist/ajv.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;\nconst core_1 = require(\"./core\");\nconst draft7_1 = require(\"./vocabularies/draft7\");\nconst discriminator_1 = require(\"./vocabularies/discriminator\");\nconst draft7MetaSchema = require(\"./refs/json-schema-draft-07.json\");\nconst META_SUPPORT_DATA = [\"/properties\"];\nconst META_SCHEMA_ID = \"http://json-schema.org/draft-07/schema\";\nclass Ajv extends core_1.default {\n _addVocabularies() {\n super._addVocabularies();\n draft7_1.default.forEach((v) => this.addVocabulary(v));\n if (this.opts.discriminator)\n this.addKeyword(discriminator_1.default);\n }\n _addDefaultMetaSchema() {\n super._addDefaultMetaSchema();\n if (!this.opts.meta)\n return;\n const metaSchema = this.opts.$data\n ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA)\n : draft7MetaSchema;\n this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n }\n defaultMeta() {\n return (this.opts.defaultMeta =\n super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));\n }\n}\nexports.Ajv = Ajv;\nmodule.exports = exports = Ajv;\nmodule.exports.Ajv = Ajv;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = Ajv;\nvar validate_1 = require(\"./compile/validate\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });\nvar codegen_1 = require(\"./compile/codegen\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return codegen_1._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return codegen_1.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return codegen_1.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return codegen_1.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return codegen_1.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return codegen_1.CodeGen; } });\nvar validation_error_1 = require(\"./runtime/validation_error\");\nObject.defineProperty(exports, \"ValidationError\", { enumerable: true, get: function () { return validation_error_1.default; } });\nvar ref_error_1 = require(\"./compile/ref_error\");\nObject.defineProperty(exports, \"MissingRefError\", { enumerable: true, get: function () { return ref_error_1.default; } });\n//# sourceMappingURL=ajv.js.map"],"names":["exports","require$$0","require$$1","require$$2","require$$4","require$$5","require$$6","require$$7"],"mappings":";;;;;;;;;;;;;;;;EACA,MAAM,CAAC,cAAc,CAAAA,SAAA,EAAU,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;EAC7DA,SAAA,CAAA,eAAA,GAA0BA,SAAA,CAAA,eAAA,GAA0BA,SAAA,CA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E,GAAG,EAAE,YAAY,EAAE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAA,CAAE,EAAE,CAAC;EACvG,MAAM,CAAC,cAAc,CAACA,SAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,SAAS,CAAC,IAAI,CAAC,CAAA,CAAE,EAAE,CAAC;EACzG,MAAM,CAAC,cAAc,CAACA,SAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,SAAS,CAAC,OAAO,CAAC,CAAA,CAAE,EAAE,CAAC;EAC/G,IAAI,kBAAkB,GAAGM,uBAAA,EAAqC;EAC9D,MAAM,CAAC,cAAc,CAACN,SAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAA,CAAE,EAAE,CAAC;EAChI,IAAI,WAAW,GAAGO,gBAAA,EAA8B;EAChD,MAAM,CAAC,cAAc,CAACP,SAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,OAAO,CAAC,CAAA,CAAE,EAAE,CAAC;AACzH;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { __exports as code } from '../../../../../_virtual/code.js';
|
|
2
|
-
|
|
3
|
-
var hasRequiredCode;
|
|
4
|
-
|
|
5
|
-
function requireCode () {
|
|
6
|
-
if (hasRequiredCode) return code;
|
|
7
|
-
hasRequiredCode = 1;
|
|
8
|
-
(function (exports$1) {
|
|
9
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
10
|
-
exports$1.regexpCode = exports$1.getEsmExportName = exports$1.getProperty = exports$1.safeStringify = exports$1.stringify = exports$1.strConcat = exports$1.addCodeArg = exports$1.str = exports$1._ = exports$1.nil = exports$1._Code = exports$1.Name = exports$1.IDENTIFIER = exports$1._CodeOrName = void 0;
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
12
|
-
class _CodeOrName {
|
|
13
|
-
}
|
|
14
|
-
exports$1._CodeOrName = _CodeOrName;
|
|
15
|
-
exports$1.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
16
|
-
class Name extends _CodeOrName {
|
|
17
|
-
constructor(s) {
|
|
18
|
-
super();
|
|
19
|
-
if (!exports$1.IDENTIFIER.test(s))
|
|
20
|
-
throw new Error("CodeGen: name must be a valid identifier");
|
|
21
|
-
this.str = s;
|
|
22
|
-
}
|
|
23
|
-
toString() {
|
|
24
|
-
return this.str;
|
|
25
|
-
}
|
|
26
|
-
emptyStr() {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
get names() {
|
|
30
|
-
return { [this.str]: 1 };
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports$1.Name = Name;
|
|
34
|
-
class _Code extends _CodeOrName {
|
|
35
|
-
constructor(code) {
|
|
36
|
-
super();
|
|
37
|
-
this._items = typeof code === "string" ? [code] : code;
|
|
38
|
-
}
|
|
39
|
-
toString() {
|
|
40
|
-
return this.str;
|
|
41
|
-
}
|
|
42
|
-
emptyStr() {
|
|
43
|
-
if (this._items.length > 1)
|
|
44
|
-
return false;
|
|
45
|
-
const item = this._items[0];
|
|
46
|
-
return item === "" || item === '""';
|
|
47
|
-
}
|
|
48
|
-
get str() {
|
|
49
|
-
var _a;
|
|
50
|
-
return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, "")));
|
|
51
|
-
}
|
|
52
|
-
get names() {
|
|
53
|
-
var _a;
|
|
54
|
-
return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => {
|
|
55
|
-
if (c instanceof Name)
|
|
56
|
-
names[c.str] = (names[c.str] || 0) + 1;
|
|
57
|
-
return names;
|
|
58
|
-
}, {})));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports$1._Code = _Code;
|
|
62
|
-
exports$1.nil = new _Code("");
|
|
63
|
-
function _(strs, ...args) {
|
|
64
|
-
const code = [strs[0]];
|
|
65
|
-
let i = 0;
|
|
66
|
-
while (i < args.length) {
|
|
67
|
-
addCodeArg(code, args[i]);
|
|
68
|
-
code.push(strs[++i]);
|
|
69
|
-
}
|
|
70
|
-
return new _Code(code);
|
|
71
|
-
}
|
|
72
|
-
exports$1._ = _;
|
|
73
|
-
const plus = new _Code("+");
|
|
74
|
-
function str(strs, ...args) {
|
|
75
|
-
const expr = [safeStringify(strs[0])];
|
|
76
|
-
let i = 0;
|
|
77
|
-
while (i < args.length) {
|
|
78
|
-
expr.push(plus);
|
|
79
|
-
addCodeArg(expr, args[i]);
|
|
80
|
-
expr.push(plus, safeStringify(strs[++i]));
|
|
81
|
-
}
|
|
82
|
-
optimize(expr);
|
|
83
|
-
return new _Code(expr);
|
|
84
|
-
}
|
|
85
|
-
exports$1.str = str;
|
|
86
|
-
function addCodeArg(code, arg) {
|
|
87
|
-
if (arg instanceof _Code)
|
|
88
|
-
code.push(...arg._items);
|
|
89
|
-
else if (arg instanceof Name)
|
|
90
|
-
code.push(arg);
|
|
91
|
-
else
|
|
92
|
-
code.push(interpolate(arg));
|
|
93
|
-
}
|
|
94
|
-
exports$1.addCodeArg = addCodeArg;
|
|
95
|
-
function optimize(expr) {
|
|
96
|
-
let i = 1;
|
|
97
|
-
while (i < expr.length - 1) {
|
|
98
|
-
if (expr[i] === plus) {
|
|
99
|
-
const res = mergeExprItems(expr[i - 1], expr[i + 1]);
|
|
100
|
-
if (res !== undefined) {
|
|
101
|
-
expr.splice(i - 1, 3, res);
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
expr[i++] = "+";
|
|
105
|
-
}
|
|
106
|
-
i++;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
function mergeExprItems(a, b) {
|
|
110
|
-
if (b === '""')
|
|
111
|
-
return a;
|
|
112
|
-
if (a === '""')
|
|
113
|
-
return b;
|
|
114
|
-
if (typeof a == "string") {
|
|
115
|
-
if (b instanceof Name || a[a.length - 1] !== '"')
|
|
116
|
-
return;
|
|
117
|
-
if (typeof b != "string")
|
|
118
|
-
return `${a.slice(0, -1)}${b}"`;
|
|
119
|
-
if (b[0] === '"')
|
|
120
|
-
return a.slice(0, -1) + b.slice(1);
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
if (typeof b == "string" && b[0] === '"' && !(a instanceof Name))
|
|
124
|
-
return `"${a}${b.slice(1)}`;
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
function strConcat(c1, c2) {
|
|
128
|
-
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;
|
|
129
|
-
}
|
|
130
|
-
exports$1.strConcat = strConcat;
|
|
131
|
-
// TODO do not allow arrays here
|
|
132
|
-
function interpolate(x) {
|
|
133
|
-
return typeof x == "number" || typeof x == "boolean" || x === null
|
|
134
|
-
? x
|
|
135
|
-
: safeStringify(Array.isArray(x) ? x.join(",") : x);
|
|
136
|
-
}
|
|
137
|
-
function stringify(x) {
|
|
138
|
-
return new _Code(safeStringify(x));
|
|
139
|
-
}
|
|
140
|
-
exports$1.stringify = stringify;
|
|
141
|
-
function safeStringify(x) {
|
|
142
|
-
return JSON.stringify(x)
|
|
143
|
-
.replace(/\u2028/g, "\\u2028")
|
|
144
|
-
.replace(/\u2029/g, "\\u2029");
|
|
145
|
-
}
|
|
146
|
-
exports$1.safeStringify = safeStringify;
|
|
147
|
-
function getProperty(key) {
|
|
148
|
-
return typeof key == "string" && exports$1.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
|
|
149
|
-
}
|
|
150
|
-
exports$1.getProperty = getProperty;
|
|
151
|
-
//Does best effort to format the name properly
|
|
152
|
-
function getEsmExportName(key) {
|
|
153
|
-
if (typeof key == "string" && exports$1.IDENTIFIER.test(key)) {
|
|
154
|
-
return new _Code(`${key}`);
|
|
155
|
-
}
|
|
156
|
-
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
|
|
157
|
-
}
|
|
158
|
-
exports$1.getEsmExportName = getEsmExportName;
|
|
159
|
-
function regexpCode(rx) {
|
|
160
|
-
return new _Code(rx.toString());
|
|
161
|
-
}
|
|
162
|
-
exports$1.regexpCode = regexpCode;
|
|
163
|
-
|
|
164
|
-
} (code));
|
|
165
|
-
return code;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export { requireCode as __require };
|
|
169
|
-
//# sourceMappingURL=code.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code.js","sources":["../../../../../../../../node_modules/ajv/dist/compile/codegen/code.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nclass _CodeOrName {\n}\nexports._CodeOrName = _CodeOrName;\nexports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\nclass Name extends _CodeOrName {\n constructor(s) {\n super();\n if (!exports.IDENTIFIER.test(s))\n throw new Error(\"CodeGen: name must be a valid identifier\");\n this.str = s;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n return false;\n }\n get names() {\n return { [this.str]: 1 };\n }\n}\nexports.Name = Name;\nclass _Code extends _CodeOrName {\n constructor(code) {\n super();\n this._items = typeof code === \"string\" ? [code] : code;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n if (this._items.length > 1)\n return false;\n const item = this._items[0];\n return item === \"\" || item === '\"\"';\n }\n get str() {\n var _a;\n return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, \"\")));\n }\n get names() {\n var _a;\n return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => {\n if (c instanceof Name)\n names[c.str] = (names[c.str] || 0) + 1;\n return names;\n }, {})));\n }\n}\nexports._Code = _Code;\nexports.nil = new _Code(\"\");\nfunction _(strs, ...args) {\n const code = [strs[0]];\n let i = 0;\n while (i < args.length) {\n addCodeArg(code, args[i]);\n code.push(strs[++i]);\n }\n return new _Code(code);\n}\nexports._ = _;\nconst plus = new _Code(\"+\");\nfunction str(strs, ...args) {\n const expr = [safeStringify(strs[0])];\n let i = 0;\n while (i < args.length) {\n expr.push(plus);\n addCodeArg(expr, args[i]);\n expr.push(plus, safeStringify(strs[++i]));\n }\n optimize(expr);\n return new _Code(expr);\n}\nexports.str = str;\nfunction addCodeArg(code, arg) {\n if (arg instanceof _Code)\n code.push(...arg._items);\n else if (arg instanceof Name)\n code.push(arg);\n else\n code.push(interpolate(arg));\n}\nexports.addCodeArg = addCodeArg;\nfunction optimize(expr) {\n let i = 1;\n while (i < expr.length - 1) {\n if (expr[i] === plus) {\n const res = mergeExprItems(expr[i - 1], expr[i + 1]);\n if (res !== undefined) {\n expr.splice(i - 1, 3, res);\n continue;\n }\n expr[i++] = \"+\";\n }\n i++;\n }\n}\nfunction mergeExprItems(a, b) {\n if (b === '\"\"')\n return a;\n if (a === '\"\"')\n return b;\n if (typeof a == \"string\") {\n if (b instanceof Name || a[a.length - 1] !== '\"')\n return;\n if (typeof b != \"string\")\n return `${a.slice(0, -1)}${b}\"`;\n if (b[0] === '\"')\n return a.slice(0, -1) + b.slice(1);\n return;\n }\n if (typeof b == \"string\" && b[0] === '\"' && !(a instanceof Name))\n return `\"${a}${b.slice(1)}`;\n return;\n}\nfunction strConcat(c1, c2) {\n return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;\n}\nexports.strConcat = strConcat;\n// TODO do not allow arrays here\nfunction interpolate(x) {\n return typeof x == \"number\" || typeof x == \"boolean\" || x === null\n ? x\n : safeStringify(Array.isArray(x) ? x.join(\",\") : x);\n}\nfunction stringify(x) {\n return new _Code(safeStringify(x));\n}\nexports.stringify = stringify;\nfunction safeStringify(x) {\n return JSON.stringify(x)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\n}\nexports.safeStringify = safeStringify;\nfunction getProperty(key) {\n return typeof key == \"string\" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;\n}\nexports.getProperty = getProperty;\n//Does best effort to format the name properly\nfunction getEsmExportName(key) {\n if (typeof key == \"string\" && exports.IDENTIFIER.test(key)) {\n return new _Code(`${key}`);\n }\n throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);\n}\nexports.getEsmExportName = getEsmExportName;\nfunction regexpCode(rx) {\n return new _Code(rx.toString());\n}\nexports.regexpCode = regexpCode;\n//# sourceMappingURL=code.js.map"],"names":["exports"],"mappings":";;;;;;;;EACA,MAAM,CAAC,cAAc,CAAAA,SAAA,EAAU,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,EAAAA,SAAA,CAAA,UAAA,GAAqBA,SAAA,CAAA,gBAAA,GAA2BA,SAAA,CAAA,WAAA,GAAsBA,SAAA,CAAA,aAAA,GAAwBA,SAAA,CAAA,SAAA,GAAoBA,sBAAoBA,SAAA,CAAA,UAAA,GAAqBA,SAAA,CAAA,GAAA,GAAcA,SAAA,CAAA,CAAA,GAAYA,SAAA,CAAA,GAAA,GAAcA,SAAA,CAAA,KAAA,GAAgBA,SAAA,CAAA,IAAA,GAAeA,SAAA,CAAA,UAAA,GAAqBA,SAAA,CAAA,WAAA,GAAsB,MAAM;AACnR;AACA,EAAA,MAAM,WAAW,CAAC;AAClB;AACA,EAAAA,SAAA,CAAA,WAAA,GAAsB,WAAW;AACjC,EAAAA,SAAA,CAAA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