@solana/transaction-messages
Advanced tools
Comparing version 2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af to 2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38
@@ -1,5 +0,5 @@ | ||
import { SolanaError, SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME, SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES } from '@solana/errors'; | ||
import { SolanaError, SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME, SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE, SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES } from '@solana/errors'; | ||
import { assertIsBlockhash } from '@solana/rpc-types'; | ||
import { getAddressEncoder, getAddressDecoder, getAddressComparator } from '@solana/addresses'; | ||
import { combineCodec, transformEncoder, addEncoderSizePrefix, transformDecoder, addDecoderSizePrefix } from '@solana/codecs-core'; | ||
import { combineCodec, transformEncoder, addEncoderSizePrefix, transformDecoder, addDecoderSizePrefix, createEncoder, createDecoder } from '@solana/codecs-core'; | ||
import { getStructEncoder, getArrayEncoder, getStructDecoder, getArrayDecoder, getStructCodec, getBytesEncoder, getBytesDecoder } from '@solana/codecs-data-structures'; | ||
@@ -162,2 +162,38 @@ import { getU8Encoder, getShortU16Encoder, getU8Decoder, getShortU16Decoder, getU8Codec } from '@solana/codecs-numbers'; | ||
} | ||
var VERSION_FLAG_MASK = 128; | ||
function getTransactionVersionEncoder() { | ||
return createEncoder({ | ||
getSizeFromValue: (value) => value === "legacy" ? 0 : 1, | ||
maxSize: 1, | ||
write: (value, bytes, offset) => { | ||
if (value === "legacy") { | ||
return offset; | ||
} | ||
if (value < 0 || value > 127) { | ||
throw new SolanaError(SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE, { | ||
actualVersion: value | ||
}); | ||
} | ||
bytes.set([value | VERSION_FLAG_MASK], offset); | ||
return offset + 1; | ||
} | ||
}); | ||
} | ||
function getTransactionVersionDecoder() { | ||
return createDecoder({ | ||
maxSize: 1, | ||
read: (bytes, offset) => { | ||
const firstByte = bytes[offset]; | ||
if ((firstByte & VERSION_FLAG_MASK) === 0) { | ||
return ["legacy", offset]; | ||
} else { | ||
const version = firstByte ^ VERSION_FLAG_MASK; | ||
return [version, offset + 1]; | ||
} | ||
} | ||
}); | ||
} | ||
function getTransactionVersionCodec() { | ||
return combineCodec(getTransactionVersionEncoder(), getTransactionVersionDecoder()); | ||
} | ||
var AddressMapEntryType = /* @__PURE__ */ ((AddressMapEntryType2) => { | ||
@@ -546,4 +582,4 @@ AddressMapEntryType2[AddressMapEntryType2["FEE_PAYER"] = 0] = "FEE_PAYER"; | ||
export { ADDRESS_MAP_TYPE_PROPERTY, AddressMapEntryType, appendTransactionMessageInstruction, appendTransactionMessageInstructions, assertIsDurableNonceTransactionMessage, assertIsTransactionMessageWithBlockhashLifetime, createTransactionMessage, getAddressMapFromInstructions, getAddressTableLookupCodec, getAddressTableLookupDecoder, getAddressTableLookupEncoder, getCompiledAddressTableLookups, getCompiledInstructions, getCompiledLifetimeToken, getCompiledMessageHeader, getCompiledStaticAccounts, getInstructionCodec, getInstructionDecoder, getInstructionEncoder, getMessageHeaderCodec, getMessageHeaderDecoder, getMessageHeaderEncoder, getOrderedAccountsFromAddressMap, newIsAdvanceNonceAccountInstruction, prependTransactionMessageInstruction, prependTransactionMessageInstructions, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, setTransactionMessageLifetimeUsingDurableNonce }; | ||
export { ADDRESS_MAP_TYPE_PROPERTY, AddressMapEntryType, appendTransactionMessageInstruction, appendTransactionMessageInstructions, assertIsDurableNonceTransactionMessage, assertIsTransactionMessageWithBlockhashLifetime, createTransactionMessage, getAddressMapFromInstructions, getAddressTableLookupCodec, getAddressTableLookupDecoder, getAddressTableLookupEncoder, getCompiledAddressTableLookups, getCompiledInstructions, getCompiledLifetimeToken, getCompiledMessageHeader, getCompiledStaticAccounts, getInstructionCodec, getInstructionDecoder, getInstructionEncoder, getMessageHeaderCodec, getMessageHeaderDecoder, getMessageHeaderEncoder, getOrderedAccountsFromAddressMap, getTransactionVersionCodec, getTransactionVersionDecoder, getTransactionVersionEncoder, newIsAdvanceNonceAccountInstruction, prependTransactionMessageInstruction, prependTransactionMessageInstructions, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, setTransactionMessageLifetimeUsingDurableNonce }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.browser.js.map |
@@ -1,5 +0,5 @@ | ||
import { SolanaError, SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME, SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES } from '@solana/errors'; | ||
import { SolanaError, SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME, SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE, SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES } from '@solana/errors'; | ||
import { assertIsBlockhash } from '@solana/rpc-types'; | ||
import { getAddressEncoder, getAddressDecoder, getAddressComparator } from '@solana/addresses'; | ||
import { combineCodec, transformEncoder, addEncoderSizePrefix, transformDecoder, addDecoderSizePrefix } from '@solana/codecs-core'; | ||
import { combineCodec, transformEncoder, addEncoderSizePrefix, transformDecoder, addDecoderSizePrefix, createEncoder, createDecoder } from '@solana/codecs-core'; | ||
import { getStructEncoder, getArrayEncoder, getStructDecoder, getArrayDecoder, getStructCodec, getBytesEncoder, getBytesDecoder } from '@solana/codecs-data-structures'; | ||
@@ -162,2 +162,38 @@ import { getU8Encoder, getShortU16Encoder, getU8Decoder, getShortU16Decoder, getU8Codec } from '@solana/codecs-numbers'; | ||
} | ||
var VERSION_FLAG_MASK = 128; | ||
function getTransactionVersionEncoder() { | ||
return createEncoder({ | ||
getSizeFromValue: (value) => value === "legacy" ? 0 : 1, | ||
maxSize: 1, | ||
write: (value, bytes, offset) => { | ||
if (value === "legacy") { | ||
return offset; | ||
} | ||
if (value < 0 || value > 127) { | ||
throw new SolanaError(SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE, { | ||
actualVersion: value | ||
}); | ||
} | ||
bytes.set([value | VERSION_FLAG_MASK], offset); | ||
return offset + 1; | ||
} | ||
}); | ||
} | ||
function getTransactionVersionDecoder() { | ||
return createDecoder({ | ||
maxSize: 1, | ||
read: (bytes, offset) => { | ||
const firstByte = bytes[offset]; | ||
if ((firstByte & VERSION_FLAG_MASK) === 0) { | ||
return ["legacy", offset]; | ||
} else { | ||
const version = firstByte ^ VERSION_FLAG_MASK; | ||
return [version, offset + 1]; | ||
} | ||
} | ||
}); | ||
} | ||
function getTransactionVersionCodec() { | ||
return combineCodec(getTransactionVersionEncoder(), getTransactionVersionDecoder()); | ||
} | ||
var AddressMapEntryType = /* @__PURE__ */ ((AddressMapEntryType2) => { | ||
@@ -546,4 +582,4 @@ AddressMapEntryType2[AddressMapEntryType2["FEE_PAYER"] = 0] = "FEE_PAYER"; | ||
export { ADDRESS_MAP_TYPE_PROPERTY, AddressMapEntryType, appendTransactionMessageInstruction, appendTransactionMessageInstructions, assertIsDurableNonceTransactionMessage, assertIsTransactionMessageWithBlockhashLifetime, createTransactionMessage, getAddressMapFromInstructions, getAddressTableLookupCodec, getAddressTableLookupDecoder, getAddressTableLookupEncoder, getCompiledAddressTableLookups, getCompiledInstructions, getCompiledLifetimeToken, getCompiledMessageHeader, getCompiledStaticAccounts, getInstructionCodec, getInstructionDecoder, getInstructionEncoder, getMessageHeaderCodec, getMessageHeaderDecoder, getMessageHeaderEncoder, getOrderedAccountsFromAddressMap, newIsAdvanceNonceAccountInstruction, prependTransactionMessageInstruction, prependTransactionMessageInstructions, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, setTransactionMessageLifetimeUsingDurableNonce }; | ||
export { ADDRESS_MAP_TYPE_PROPERTY, AddressMapEntryType, appendTransactionMessageInstruction, appendTransactionMessageInstructions, assertIsDurableNonceTransactionMessage, assertIsTransactionMessageWithBlockhashLifetime, createTransactionMessage, getAddressMapFromInstructions, getAddressTableLookupCodec, getAddressTableLookupDecoder, getAddressTableLookupEncoder, getCompiledAddressTableLookups, getCompiledInstructions, getCompiledLifetimeToken, getCompiledMessageHeader, getCompiledStaticAccounts, getInstructionCodec, getInstructionDecoder, getInstructionEncoder, getMessageHeaderCodec, getMessageHeaderDecoder, getMessageHeaderEncoder, getOrderedAccountsFromAddressMap, getTransactionVersionCodec, getTransactionVersionDecoder, getTransactionVersionEncoder, newIsAdvanceNonceAccountInstruction, prependTransactionMessageInstruction, prependTransactionMessageInstructions, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, setTransactionMessageLifetimeUsingDurableNonce }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.native.js.map |
@@ -1,5 +0,5 @@ | ||
import { SolanaError, SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME, SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES } from '@solana/errors'; | ||
import { SolanaError, SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME, SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE, SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES } from '@solana/errors'; | ||
import { assertIsBlockhash } from '@solana/rpc-types'; | ||
import { getAddressEncoder, getAddressDecoder, getAddressComparator } from '@solana/addresses'; | ||
import { combineCodec, transformEncoder, addEncoderSizePrefix, transformDecoder, addDecoderSizePrefix } from '@solana/codecs-core'; | ||
import { combineCodec, transformEncoder, addEncoderSizePrefix, transformDecoder, addDecoderSizePrefix, createEncoder, createDecoder } from '@solana/codecs-core'; | ||
import { getStructEncoder, getArrayEncoder, getStructDecoder, getArrayDecoder, getStructCodec, getBytesEncoder, getBytesDecoder } from '@solana/codecs-data-structures'; | ||
@@ -162,2 +162,38 @@ import { getU8Encoder, getShortU16Encoder, getU8Decoder, getShortU16Decoder, getU8Codec } from '@solana/codecs-numbers'; | ||
} | ||
var VERSION_FLAG_MASK = 128; | ||
function getTransactionVersionEncoder() { | ||
return createEncoder({ | ||
getSizeFromValue: (value) => value === "legacy" ? 0 : 1, | ||
maxSize: 1, | ||
write: (value, bytes, offset) => { | ||
if (value === "legacy") { | ||
return offset; | ||
} | ||
if (value < 0 || value > 127) { | ||
throw new SolanaError(SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE, { | ||
actualVersion: value | ||
}); | ||
} | ||
bytes.set([value | VERSION_FLAG_MASK], offset); | ||
return offset + 1; | ||
} | ||
}); | ||
} | ||
function getTransactionVersionDecoder() { | ||
return createDecoder({ | ||
maxSize: 1, | ||
read: (bytes, offset) => { | ||
const firstByte = bytes[offset]; | ||
if ((firstByte & VERSION_FLAG_MASK) === 0) { | ||
return ["legacy", offset]; | ||
} else { | ||
const version = firstByte ^ VERSION_FLAG_MASK; | ||
return [version, offset + 1]; | ||
} | ||
} | ||
}); | ||
} | ||
function getTransactionVersionCodec() { | ||
return combineCodec(getTransactionVersionEncoder(), getTransactionVersionDecoder()); | ||
} | ||
var AddressMapEntryType = /* @__PURE__ */ ((AddressMapEntryType2) => { | ||
@@ -546,4 +582,4 @@ AddressMapEntryType2[AddressMapEntryType2["FEE_PAYER"] = 0] = "FEE_PAYER"; | ||
export { ADDRESS_MAP_TYPE_PROPERTY, AddressMapEntryType, appendTransactionMessageInstruction, appendTransactionMessageInstructions, assertIsDurableNonceTransactionMessage, assertIsTransactionMessageWithBlockhashLifetime, createTransactionMessage, getAddressMapFromInstructions, getAddressTableLookupCodec, getAddressTableLookupDecoder, getAddressTableLookupEncoder, getCompiledAddressTableLookups, getCompiledInstructions, getCompiledLifetimeToken, getCompiledMessageHeader, getCompiledStaticAccounts, getInstructionCodec, getInstructionDecoder, getInstructionEncoder, getMessageHeaderCodec, getMessageHeaderDecoder, getMessageHeaderEncoder, getOrderedAccountsFromAddressMap, newIsAdvanceNonceAccountInstruction, prependTransactionMessageInstruction, prependTransactionMessageInstructions, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, setTransactionMessageLifetimeUsingDurableNonce }; | ||
export { ADDRESS_MAP_TYPE_PROPERTY, AddressMapEntryType, appendTransactionMessageInstruction, appendTransactionMessageInstructions, assertIsDurableNonceTransactionMessage, assertIsTransactionMessageWithBlockhashLifetime, createTransactionMessage, getAddressMapFromInstructions, getAddressTableLookupCodec, getAddressTableLookupDecoder, getAddressTableLookupEncoder, getCompiledAddressTableLookups, getCompiledInstructions, getCompiledLifetimeToken, getCompiledMessageHeader, getCompiledStaticAccounts, getInstructionCodec, getInstructionDecoder, getInstructionEncoder, getMessageHeaderCodec, getMessageHeaderDecoder, getMessageHeaderEncoder, getOrderedAccountsFromAddressMap, getTransactionVersionCodec, getTransactionVersionDecoder, getTransactionVersionEncoder, newIsAdvanceNonceAccountInstruction, prependTransactionMessageInstruction, prependTransactionMessageInstructions, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, setTransactionMessageLifetimeUsingDurableNonce }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.node.js.map |
export * from './address-table-lookup.js'; | ||
export * from './header.js'; | ||
export * from './instruction.js'; | ||
export * from './transaction-version.js'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@solana/transaction-messages", | ||
"version": "2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af", | ||
"version": "2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38", | ||
"description": "Helpers for creating transaction messages", | ||
@@ -49,9 +49,9 @@ "exports": { | ||
"dependencies": { | ||
"@solana/addresses": "2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af", | ||
"@solana/codecs-core": "2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af", | ||
"@solana/codecs-data-structures": "2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af", | ||
"@solana/codecs-numbers": "2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af", | ||
"@solana/errors": "2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af", | ||
"@solana/instructions": "2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af", | ||
"@solana/rpc-types": "2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af" | ||
"@solana/addresses": "2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38", | ||
"@solana/codecs-core": "2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38", | ||
"@solana/codecs-data-structures": "2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38", | ||
"@solana/codecs-numbers": "2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38", | ||
"@solana/errors": "2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38", | ||
"@solana/instructions": "2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38", | ||
"@solana/rpc-types": "2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38" | ||
}, | ||
@@ -58,0 +58,0 @@ "bundlewatch": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
414426
51
3130
+ Added@solana/addresses@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38(transitive)
+ Added@solana/assertions@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38(transitive)
+ Added@solana/codecs-core@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38(transitive)
+ Added@solana/codecs-data-structures@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38(transitive)
+ Added@solana/codecs-numbers@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38(transitive)
+ Added@solana/codecs-strings@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38(transitive)
+ Added@solana/errors@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38(transitive)
+ Added@solana/instructions@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38(transitive)
+ Added@solana/rpc-types@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38(transitive)
- Removed@solana/addresses@2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af(transitive)
- Removed@solana/assertions@2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af(transitive)
- Removed@solana/codecs-core@2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af(transitive)
- Removed@solana/codecs-data-structures@2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af(transitive)
- Removed@solana/codecs-numbers@2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af(transitive)
- Removed@solana/codecs-strings@2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af(transitive)
- Removed@solana/errors@2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af(transitive)
- Removed@solana/instructions@2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af(transitive)
- Removed@solana/rpc-types@2.0.0-preview.1.20240408132847.53e8f7549f30623162c150dea49b45f6735611af(transitive)
Updated@solana/addresses@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38
Updated@solana/codecs-core@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38
Updated@solana/codecs-numbers@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38
Updated@solana/errors@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38
Updated@solana/instructions@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38
Updated@solana/rpc-types@2.0.0-preview.1.20240408133046.55bbe46a054ae4688c3a59c5fda5577e90188a38